You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+19
Original file line number
Diff line number
Diff line change
@@ -517,6 +517,25 @@ If you don't specify the strategy by yourself, `CorrelationIdStrategy.FromProper
517
517
properties (or headers) and generate a new one if it doesn't succeed. In any way, the CID will be part of both logs and resulting (outgoing)
518
518
RabbitMQ message.
519
519
520
+
#### Publisher confirms
521
+
522
+
By using following configuration
523
+
```hocon
524
+
producer {
525
+
properties {
526
+
confirms {
527
+
enabled = true
528
+
sendAttempts = 2
529
+
}
530
+
}
531
+
}
532
+
```
533
+
clients can enable [publisher confirms](https://www.rabbitmq.com/confirms.html#publisher-confirms). Each `send` call will wait for ack/nack from broker.
534
+
This wait is of course non-blocking. `sendAttempts` is number of all attempts including initial one. If number of `sendAttempts` is greater than 1 it will try to resend messages again
535
+
right after it obtains nack from broker.
536
+
537
+
From implementation point of view, it uses asynchronous acks/nacks combined with [Deferred](https://typelevel.org/cats-effect/docs/std/deferred) from cats library.
538
+
520
539
#### Consumers
521
540
522
541
You can also get the CorrelationId from the message properties on the consumer side. The CID is taken from both AMQP properties
0 commit comments