Cannot publish messages when publisherConfirms=true and timeout=0
See original GitHub issueSubject of the issue
When I set publisherConfirms=true
and timeout=0
(to have infinite timeout) at the same time in connectionString, I cannot publish (any kind of publish) messages. Subscribing messages with the same connectionString is okay though. I checked RabbitMQ management and see no message is published at all.
Your environment
- .Net Core 3.1
- EasyNetQ 3.7.1
- RabbitMQ 3.8.2
Steps to reproduce
Define a connectionString with ;publisherConfirms=true;timeout=0
properties and cannot publish messages.
This is the whole program to reproduce the issue
class Program
{
static void Main(string[] args)
{
var bus = RabbitHutch.CreateBus(
"host=localhost;username=guest;password=guest;publisherConfirms=true;timeout=0");
// cannot publish message when publisherConfirms=true;timeout=0 both together
bus.Subscribe<XMessage>(
"freaking_subscriptionId",
message => Console.WriteLine($"message received \"{message.Text}\"")
);
bus.Publish(new XMessage {Text = "something"});
Console.WriteLine("press any key to exit");
Console.ReadKey();
bus.Dispose();
}
private class XMessage
{
public string Text {get;set;}
}
}
Expected behaviour
the message is published and “message received” is logged in the console.
Actual behaviour
no message is published.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
Publishing messages burst timeout · Issue #1462
Unable to publish for key "....". Reason: Total timeout of API google.pubsub.v1.Publisher exceeded 60000 milliseconds before any response was ...
Read more >Spring integration - Publisher Confirms with timeout?
My guess is that somehow publish of message is waiting for rabbit to do PUBLISHER CONFIRMS but it never gets it and times...
Read more >Issue with timeouts publishing to RabbitMQ
We have written an application that publishes to rabbit using the headers exchange for routing to queues (approximately 1800 queues ...
Read more >Reliable Publishing with Publisher Confirms
Strategy #1: Publishing Messages Individually The method returns as soon as the message has been confirmed. If the message is not confirmed within...
Read more >Spring AMQP
Publishing messages is an asynchronous mechanism and, by default, messages that cannot be routed are dropped by RabbitMQ. For successful publishing, you can ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Resolved by #1049.
@mortzi Many thanks for this issue 😉
Hi @mortzi.
Thanks for the report.
From implementation point of view I could confirm that there are two bugs: