Closed Soarnsky closed 4 years ago
You can send additional headers when you subscribe. According to this link...
https://activemq.apache.org/stomp.html
...you can send the prefetchSize then. Is that what you mean?
Right, the problem is when I set prefetchSize to 0, there's an AttributeError for StompConnection. Missing method receive()
StompConnection doesn't accept additional headers. You can pass them on connect - which seems to work for me (no errors at least). Looking at the docs though it seems like the prefetchSize header should be provided on subscribe though.
@jasonrbriggs @Soarnsky
on connect pass:
headers={'activemq.prefetchSize': <SOME_VALUE_INT>}
so it can be closed.
For my use case, we use ActiveMQ as a task queue. Consumer processes the task extremely slowly, around 1-2 hours, so I distribute it across 6 consumers. Low number of messages, long time to process, so having prefetchSize set to 0 to have the consumer request messages instead seems to fit my use case.
Is there any way to do this now that I'm not seeing here? If not can prefetchSize set to 0 be supported with a receive() method in the Connection?