-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to implement a consumer that also publishes messages #886
Comments
Thank you for your time. Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team). We get at least a dozen of questions through various venues every single day, often light on details. Please post this to rabbitmq-users. Thank you. |
This kind of exception is solid evidence of incorrect frame interleaving on a shared channel. Without any specifics of your code the only suggestion we have is to use a separate channel for publishing. Consider putting together a repository that can be used to reproduce without guessing. |
We have no evidence of this but #878 and #868 can be relevant here. @Bibek-Singh9 would you be able to give #878 a try with your exact workload (test)? |
I am trying to implement a consumer that also publishes message.
Usage case-
Created an Exchange "A" and bind a queue "A-queue" and produced a message.
Created a consumer, consuming message from "A-queue" of Exchange "A".
Within the consumer's handler, I am trying to publish/produce message to a new Exchange "B", It works for once or twice out of 100 times and fails with exception -
The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=505, text='UNEXPECTED FROM - expected content body, got non content body frame instead', class Id=60, methodId=40
note: But the same piece of code works till version - RabbitMQ.Client 5.2.0, in the later versions - 6.0.0 and above it causes this issue.
The produce and consume code is encapsulated in methods.
Stacktrace-
at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)
at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body)
at RabbitMQ.Client.Framing.Impl.Model._Private_ExchangeDeclare(String exchange, String type, Boolean passive, Boolean durable, Boolean autoDelete, Boolean internal, Boolean nowait, IDictionary
2 arguments) at RabbitMQ.Client.Impl.ModelBase.ExchangeDeclare(String exchange, String type, Boolean durable, Boolean autoDelete, IDictionary
2 arguments)at RabbitMQ.Client.Impl.AutorecoveringModel.ExchangeDeclare(String exchange, String type, Boolean durable, Boolean autoDelete, IDictionary
2 arguments) at RabbitMQ.Client.IModelExensions.ExchangeDeclare(IModel model, String exchange, String type, Boolean durable, Boolean autoDelete, IDictionary
2 arguments)at Bentley.Extensions.MessageBus.RabbitMQ.RabbitMQProducer.d__4.MoveNext() in D:\Projects\MessageBus\src\NetCore\Bentley.Extensions.MessageBus.RabbitMQ\RabbitMQProducer.cs:line 54
The text was updated successfully, but these errors were encountered: