File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/main/java/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,15 @@ public void basicPublish(Channel channel) {
102102 }
103103 }
104104
105+ @ Override
106+ public void basicPublishFailure (Channel channel ) {
107+ try {
108+ markMessagePublishFailed ();
109+ } catch (Exception e ) {
110+ LOGGER .info ("Error while computing metrics in basicPublishFailure: " + e .getMessage ());
111+ }
112+ }
113+
105114 @ Override
106115 public void basicConsume (Channel channel , String consumerTag , boolean autoAck ) {
107116 try {
@@ -331,6 +340,11 @@ private ChannelState(Channel channel) {
331340 */
332341 protected abstract void markPublishedMessage ();
333342
343+ /**
344+ * Marks the event of a message publishing failure.
345+ */
346+ protected abstract void markMessagePublishFailed ();
347+
334348 /**
335349 * Marks the event of a consumed message.
336350 */
You can’t perform that action at this time.
0 commit comments