gnodet-bot commented on code in PR #27173:
URL: https://github.com/apache/camel/pull/27173#discussion_r4262512524


##########
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sjms2-component.adoc:
##########
@@ -316,3 +316,34 @@ Currently, the only correlation strategy is to use the 
`JMSCorrelationId`.
 The _InOut_ Consumer uses this strategy as well ensuring that all
 response messages to the included `JMSReplyTo` destination also have the
 `JMSCorrelationId` copied from the request as well.
+
+=== Batch consuming
+
+The consumer can be configured to receive messages in batches instead of one 
at a time, by setting
+`batching=true`. Instead of one Exchange per message, the route receives a 
single Exchange whose body
+is a `List<Exchange>`, one per JMS message in the batch, with a 
`CamelSjmsBatchSize` header giving the
+batch's size. Each Exchange in the batch is comparable to the Exchange 
generated by a non-batching consumer.
+
+Batching only supports the InOnly exchange pattern. There is no 
reply-to/request-response support for
+batched consumption — a batch of N unrelated messages has no well-defined 
single reply, so InOut
+routes are not supported when `batching=true`.
+
+A batch completes when either `batchSize` messages have been received, or the 
`batchInterval` —
+measured from the first message in the batch — has elapsed.
+
+Commit/acknowledgement happens once per batch rather than once per message. 
With
+`acknowledgementMode=AUTO_ACKNOWLEDGE`, messages are acknowledged as they're 
received into the batch,
+before routing — so a failed batch cannot be redelivered. Use 
`transacted=true` or
+`acknowledgementMode=CLIENT_ACKNOWLEDGE` if the whole batch should be 
redelivered together on failure.
+
+A failed batch is rolled back and redelivered as a whole, so the route should 
be idempotent. One bad message
+fails, and redelivers, the whole batch: all its messages share the delivery 
count, and they end up together
+in the broker's dead letter queue (if one is configured). How often and how 
fast the broker redelivers is

Review Comment:
   📝 **Nit (docs grammar):** The phrase "One bad message fails, and redelivers, 
the whole batch" is grammatically ambiguous — the commas make it read as if the 
message is the subject of "redelivers", which it isn't (the broker redelivers 
the batch).
   
   ```suggestion
   +A failed batch is rolled back and redelivered as a whole, so the route 
should be idempotent. One bad message fails the whole batch, which is then 
redelivered
   ```
   
   Same issue in `components/camel-sjms/src/main/docs/sjms-component.adoc` 
(line 335–336) and `components/camel-sjms2/src/main/docs/sjms2-component.adoc` 
— fix in the source files and re-run Regen.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to