Announcement Announcement Module
Collapse
No announcement yet.
Integration:Aggregato- message-release-conditions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Integration:Aggregato- message-release-conditions

    Hi,
    I am trying to receive messages from a message queue (RabbitMQ) and aggregate those messages for batch processing.
    Below is the configuration for for aggregator:
    <int:aggregator id="catMessageAggregator"
    auto-startup="true"
    message-store="messageStore"
    input-channel="aggregate.message"
    output-channel="catalogue.eventMessange"
    send-partial-result-on-expiry="true"
    correlation-strategy="aggreagatorStartegy"
    correlation-strategy-method="correlationStartegy"
    release-strategy="aggreagatorStartegy"
    release-strategy-method="canRelease"
    expire-groups-upon-completion="true"
    send-timeout="100" />
    <bean id="messageStore" class="org.springframework.integration.store.Simpl eMessageStore">

    </bean>

    <bean id="reaper" class="org.springframework.integration.store.Messa geGroupStoreReaper">
    <property name="messageGroupStore" ref="messageStore"/>
    <property name="timeout" value="100"/>
    <property name="expireOnDestroy" value="true"/>

    </bean>

    <task:scheduled-tasks scheduler="scheduler">
    <task:scheduled ref="reaper" method="run" fixed-rate="1000"/>
    </task:scheduled-tasks>

    <task:scheduler id="scheduler"/>

    I am trying to build conditions that message should be released if number of message is equal to 10 or message age has passed 100 millisecond .

    P.S.
    when messages are released and if processing time in downstream system is more and in between the scheduler runs, it again releases the same bunch of messages which is currently being processed, thus creating duplicate messages.
    Does message store not remove message once it is released?
    If not what should be method to deal with this kind of scenario.

    regards,
    Rahul kumar
Working...
X