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
Hello, I'm trying to set additional headers on messages when sending them to dlq after a message.nack(). Currently this does not seem to work. The code I tried uses:
OutgoingRabbitMQMetadata metadata = new OutgoingRabbitMQMetadata.Builder() .withHeaders(headers) .build();
to create the metadata. I then tried adding it to the message first:
message.addMetadata(metadata); message.nack(new RuntimeException("Fail to DLQ");
And after that didn't work tried adding the metadata inside the nack:
message.nack(new RuntimeException("Fail to DLQ"), Metadata.of(metadata));
Am I missing something here or is it not possible to add headers when sending to the DLQ?
The text was updated successfully, but these errors were encountered:
Hello, I'm trying to set additional headers on messages when sending them to dlq after a message.nack(). Currently this does not seem to work. The code I tried uses:
OutgoingRabbitMQMetadata metadata = new OutgoingRabbitMQMetadata.Builder() .withHeaders(headers) .build();
to create the metadata. I then tried adding it to the message first:
message.addMetadata(metadata); message.nack(new RuntimeException("Fail to DLQ");
And after that didn't work tried adding the metadata inside the nack:
message.nack(new RuntimeException("Fail to DLQ"), Metadata.of(metadata));
Am I missing something here or is it not possible to add headers when sending to the DLQ?
The text was updated successfully, but these errors were encountered: