I have a publish-subscribe-channel as defined below.
Subscriber takes around 5-30 seconds to process each message that is received on the channel. When publisher sends hundreds of messages am getting OutOfMemory error.
<task:executor id="my-subscbr-pool" pool-size="1"/>
<!-- All Messages will published on this channel. -->
<publish-subscribe-channel id="myChannel" task-executor="my-subscbr-pool"/>
I do not see a way of defining 'capacity' for this channel. How do you specify capacity? What are the other ways of implementing this?
If channel reaches the capacity can SI block the sender (publisher) thread until space is available?