Class MockInMemoryProducerAdapter

    • Constructor Detail

      • MockInMemoryProducerAdapter

        public MockInMemoryProducerAdapter​(InMemoryKafkaBroker broker)
    • Method Detail

      • sendMessage

        public java.util.concurrent.CompletableFuture<PubSubProduceResult> sendMessage​(java.lang.String topic,
                                                                                       java.lang.Integer partition,
                                                                                       KafkaKey key,
                                                                                       KafkaMessageEnvelope value,
                                                                                       PubSubMessageHeaders headers,
                                                                                       PubSubProducerCallback callback)
        Description copied from interface: PubSubProducerAdapter
        Sends a message to a PubSub topic asynchronously and returns a Future representing the result of the produce operation.
        Specified by:
        sendMessage in interface PubSubProducerAdapter
        Parameters:
        topic - The name of the Kafka topic to which the message will be sent.
        partition - The partition to which the message should be sent.
        key - The key associated with the message, used for partitioning and message retrieval.
        value - The message payload to be sent to the PubSubTopic topic.
        headers - Additional headers to be included with the message.
        callback - An optional callback to handle the result of the produce operation.
        Returns:
        A Future representing the result of the produce operation.