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
{{ message }}
Repository navigation
Allow events to trigger the creation of MessageGroup in MessageGroupStore [INT-2208] #6190
Splitters (for example) should be able to trigger the creation of a MessageGroup with a given correlationID. This would allow the action of splitting to prompt a the creation of a new MessageGroup in a specified MessageStore. An aggregator downstream using that MessageStore would "expect" messages and timeouts on that group would begin. If no messages ever arrive, the reaper will still expire the group after the timeout and a workflow could handle the situation as needed.
I just thought about something. Seems to me like a cross cutting concern and can exists anywhere
May be all we need is tow write a configurable and specialized ChannelInterceptor (e.g., GroupCreatingChannelInterceptor) and even hid its details behind the namespace. So for the default configuration we would have something like this:
What I like about this approach is that it seems very intuitive to me from the cutting concern perspective hence the Channel Interceptors. And most importantly you can do it now if you chose to write your own grop creator.
We should keep in mind here that our MessageGroupStore implementations don't allow to create empty groups: it is created by first addMessageToGroup. And even MongoDB implementation doesn't have separate document for MessageGroup entity - group metadata is stored within each MessageDocument.
Gary, can you explain how event from expiration may be useful?
So, it scatters (distributes) the message and is ready for reply.
Unfortunately currently its gatherer part starts working only when the first message arrives and exactly this moment is treated as group timeout creation point, when we are interested in exactly the moment when we scatter the message.
We have a MessageTriggerAction contract. So, an aggregator ca implement it and react respectively: take a correlationKey and create an empty group.
We might need to revise MessageGroupStore impls to see if they allow to create empty groups.
My MongoDB comment might be out-dated already according to the current state of code.
Activity
spring-operator commentedon May 30, 2012
Oleg Zhurakousky commented
We are going to address it for 2.2. And we already have another request which could be solved by resolving this issue: http://forum.springsource.org/showthread.php?126969-Is-this-a-use-case-for-an-aggregator
spring-operator commentedon Aug 7, 2012
Oleg Zhurakousky commented
I just thought about something. Seems to me like a cross cutting concern and can exists anywhere
May be all we need is tow write a configurable and specialized ChannelInterceptor (e.g., GroupCreatingChannelInterceptor) and even hid its details behind the namespace. So for the default configuration we would have something like this:
The above would create message group looking for a default 'corelationId' headers in the Message.
Or you can specify your own header
What I like about this approach is that it seems very intuitive to me from the cutting concern perspective hence the Channel Interceptors. And most importantly you can do it now if you chose to write your own grop creator.
spring-operator commentedon Aug 16, 2012
Oleg Zhurakousky commented
We'll be addressing it in the first milestone of 3.0 which should be out before SpringOne
spring-operator commentedon Jul 5, 2013
Gary Russell commented
See also: http://forum.springsource.org/showthread.php?139534-Question-about-MessageGroupStoreReaper-timeout
It's not clear to me this will help because there will be nothing to discard for a "reaped" empty group.
Maybe we could add an Application event for reaped groups and an
<event:inbound-channel-adapter/>can consume it.spring-operator commentedon Jan 22, 2014
Artem Bilan commented
We should keep in mind here that our
MessageGroupStoreimplementations don't allow to create empty groups: it is created by firstaddMessageToGroup. And even MongoDB implementation doesn't have separate document forMessageGroupentity - group metadata is stored within eachMessageDocument.Gary, can you explain how
eventfrom expiration may be useful?spring-operator commentedon Oct 8, 2021
Artem Bilan commented
See Scatter-Gather use-case: https://stackoverflow.com/questions/69458917/scatter-gather-with-parallel-flow-timeout-in-aggregator.
So, it scatters (distributes) the message and is ready for reply.
Unfortunately currently its gatherer part starts working only when the first message arrives and exactly this moment is treated as group timeout creation point, when we are interested in exactly the moment when we scatter the message.
spring-operator commentedon Dec 1, 2022
Artem Bilan commented
We have a
MessageTriggerActioncontract. So, an aggregator ca implement it and react respectively: take acorrelationKeyand create an empty group.We might need to revise
MessageGroupStoreimpls to see if they allow to create empty groups.My MongoDB comment might be out-dated already according to the current state of code.