I tried to use Solace with my Quarkus application. I would like to consume messages based on batch but I didn’t see any information for Solace in Quarkus, just some info in Spring Cloud. Could you give me the page/section/question/setup about that?
Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:
Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.
AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a
. If my response doesn’t make sense for your topic, please react to it with a
.
Looking at the documentation, I don’t find specific information about configuring batch message consumption in a Quarkus application with Solace software event broker. However, there is some relevant information about message batching in general:
Message batching is supported on the consumer side, with the following key points:
-
Batch size configuration affects:
- Throughput (larger batches can improve throughput)
- Number of duplicates (larger batches could lead to more duplicates)
-
Important batch processing behaviors:
- If batch size > 1 and an error occurs processing any message in the batch, all messages in the batch are rejected
- Batching can be disabled by setting batch size to 1
-
Metrics for batched messages:
- Batch-level metrics increment once per batch, not per message
- Message-level counts available via specific metrics
For specific guidance on implementing batch message consumption in a Quarkus application, I recommend checking:
The exact configuration will depend on which Solace messaging API you’re using with Quarkus.
Hi @finluu - Are you using Official Solace Quarkus Extension for consuming messages from Solace? Quarkus Solace. If yes, currently batch configuration is not supported. However, the extension provides the ability to ack messages after successful processing(Quarkus Solace), so I believe you can have a custom logic to build desired batch size and send acknowledgement after processing.
Hi @sravanthotakura, thank you for your information. However, as I understand about Solace config, I can not take advantage of some configs:
quarkus.solace.SUB_ACK_WINDOW_SIZE=200
quarkus.solace.SUB_ACK_WINDOW_THRESHOLD=50
Because this configs required AUTO_ACK, but when we use your recommendation, it didn’t work. Could you give me an alternative solution for that? I appreciate if you can help me.
Once again, thank you.
Hi @finluu - The configuration you have mentioned works as follows.
”The Solace messaging API reads messages in bulk from the queue using a windowing mechanism similar to TCP. The Solace messaging API then presents the messages to the application one by one. When you call acknowledge(), the API also batches the acknowledgements back to the broker. This is all managed for you by the Solace messaging API. Using the sample I have shared you can call acknowledge() on each message(post processing the batch of messages) to send the acknowledgements back to broker.”
I don’t think AUTO_ACK is required for the above configuration. Client Acknowledgement(SUPPORTED_MESSAGE_ACK_CLIENT) should still work.
It would be helpful, if you can share the sample code used for testing.