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
i encounter a problem that when i received one msg,i have to proceed a long time ,so when i received the next msg,i got a delay msg published by the publisher that i don't need.
i need the no-delay msg so if the msg published too fast, some of them should be abandoned.
can anybody give me some advice?
i try the immediate flag,but it do not work,beacuse i think when my program is running, there is a consumer connected to the exchange.
When setting up your consumer set no_ack to false, and leave the message pre-fetch at 1 (or basic.qos = 1). This will make it so the broker will not deliver the next message until you've ack'ed the last message you consumed. This should make it so the immediate flag bounces message that aren't consumed immeidately.
FYI: the RabbitMQ guys are thinking of dropping support for the immediate flag in future versions of the broker.
i encounter a problem that when i received one msg,i have to proceed a long time ,so when i received the next msg,i got a delay msg published by the publisher that i don't need.
i need the no-delay msg so if the msg published too fast, some of them should be abandoned.
can anybody give me some advice?
i try the immediate flag,but it do not work,beacuse i think when my program is running, there is a consumer connected to the exchange.
while(true)
{
std::string msg;
std::string rk;
if(!this->waitforMessage(msg ,rk)){
continue;
}
sleep(2000);
}
thanks.
The text was updated successfully, but these errors were encountered: