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
First, thank you for this library, it helps a lot !
RabbitMq : 3.7.16
RawRabbit : 2.0.0-rc5
I have two apps, one who send a message on the bus Sender and one who listen Listner.
The Listner app is a console application. I’ve followed the sample you provide.
I’ve setup SubscribeAsync like describe here #356 (comment)
I have no issue to emit a message and read it, but the retry later leads to an error in RabbitMQ:
Error in the RabbitMQ logs :
2019-07-17 11:26:01.290 [error] <0.869.0> Channel error on connection <0.739.0> (172.27.0.2:36527 -> 172.27.0.3:5672, vhost: 'emailing', user: 'Listner'), channel 3: operation basic.publish caused a channel exception precondition_failed: user_id property set to 'Sender' but authenticated user was 'Listner'
Debug logs of the Listner app :
[09:09:06 DBG] Stage HandlerInvoked has no additional middlewares registered.
[09:09:06 INF] Declaring exchange default_retry_later_exchange.
[09:09:06 DBG] Done processing topology work.
[09:09:06 INF] Message is marked for Retry. Will be published on exchange e-emailing with routing key email_low_priority in 00:00:02
[09:09:06 INF] Declaring queue retry_for_e-emailing_in_2000_ms.
[09:09:06 DBG] Done processing topology work.
[09:09:06 INF] Binding queue retry_for_e-emailing_in_2000_ms to exchange default_retry_later_exchange with routing key email_low_priority
[09:09:06 DBG] Done processing topology work.
[09:09:06 DBG] Existing connection is open and will be used.
[09:09:06 INF] Unbinding queue retry_for_e-emailing_in_2000_ms from exchange default_retry_later_exchange with routing key email_low_priority
[09:09:06 DBG] Done processing topology work.
[09:09:06 DBG] Stage MessageAcknowledged has no additional middlewares registered.
With a TCPDUMP I discover that when the “retry later” request is sent to RabbitMQ by the Listner app, in the header of the request the User-Id is Sender. That’s the user id of the Sender app, not the one of the Listner app. And I think that’s why RabbitMQ raise an error.
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
The reason RabbitMQ rejects the publish to the retry exchange (as well as the default error exchange) is that in order to preserve all of the message properties as they were originally published the relevant middleware simply reuses almost all of the BasicProperties in the incoming message, including the UserId.
This is fine if the publisher and consumer are using the same RabbitMQ user id, however if they are different RabbitMQ will not allow the consumer to publish a message using the original publisher's user id. I have what I believe is a fix for it and will be creating a pull request.
First, thank you for this library, it helps a lot !
RabbitMq : 3.7.16
RawRabbit : 2.0.0-rc5
I have two apps, one who send a message on the bus
Sender
and one who listenListner
.The
Listner
app is a console application. I’ve followed the sample you provide.I’ve setup
SubscribeAsync
like describe here #356 (comment)I have no issue to emit a message and read it, but the retry later leads to an error in RabbitMQ:
Error in the RabbitMQ logs :
2019-07-17 11:26:01.290 [error] <0.869.0> Channel error on connection <0.739.0> (172.27.0.2:36527 -> 172.27.0.3:5672, vhost: 'emailing', user: 'Listner'), channel 3: operation basic.publish caused a channel exception precondition_failed: user_id property set to 'Sender' but authenticated user was 'Listner'
Debug logs of the
Listner
app :To try to understand what’s wrong I set up a Dummy project to play https://github.com/waldo2188/RawRabbitPlayground.
With a TCPDUMP I discover that when the “retry later” request is sent to RabbitMQ by the
Listner
app, in the header of the request theUser-Id
isSender
. That’s the user id of theSender
app, not the one of theListner
app. And I think that’s why RabbitMQ raise an error.What am I doing wrong?
The text was updated successfully, but these errors were encountered: