Announcement Announcement Module
Collapse
No announcement yet.
Messages lost when capacity reached Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Messages lost when capacity reached

    I am finding that messages are lost in my scenario described below:

    Service Activator outputs 2 messages to a pub/sub channel.

    There are 2 consumers and they each consume the message OK.

    One of the Consumers is a <bridge/> which simply moves the message onto a Pollable Channel (this is my results channel).

    The Pollable 'results' Channel has a capacity of 1.

    As you can see the channel capacity is smaller than the expected output of 2.

    Q)What happens to a sent message when a channel is full?

    My understanding from the API is that the client to the channel will block until there is room.

    What I am finding is that when room is made, the blocked client fails to add the message to the Pollable Channel for some reason.

    Any advice appreciated.
    Last edited by jamesclinton; Mar 31st, 2009, 04:45 AM.

  • #2
    Could you attach your sample code? Basically a tescase with a config file should do the trick. I'll run it against HEAD and see if I can reproduce this and give you some feedback.

    Comment


    • #3
      Did you figure out the solution to the problem? I am having a similar problem, and would be interested in knowing about it. Thanks.

      Comment


      • #4
        Can we please get a failing test case?

        Thanks,
        Mark

        Comment


        • #5
          Originally posted by Mark Fisher View Post
          Can we please get a failing test case?

          Thanks,
          Mark
          I am using a queue channel based mechanism to store my payload data and send it to the destination. The xml code is as follows:

          Code:
          <int:channel id="annotatorChannel" datatype="com.mycompany.auditing.auditservice.AuditEvent">
          		<int:queue capacity="500" />
          		<int:interceptors>
          			<int:ref bean="persistenceInterceptor"/>
          		</int:interceptors>
          	</int:channel>
          	
          	<int:channel id="destinationChannel" datatype="com.mycompany.auditing.auditservice.AuditEvent">
          		<int:queue capacity="500" />
          		<int:interceptors>
          			<int:ref bean="persistenceInterceptor" />
          		</int:interceptors>
          	</int:channel>
          
          <int:poller id="defaultPoller" default="true" max-messages-per-poll="10">
          	    <int:interval-trigger interval="1" time-unit="SECONDS"/>
          	 </int:poller>
          
          <int:outbound-channel-adapter channel="destinationChannel" ref ="destinationAdapter" method="handleAuditEvent">
           </int:outbound-channel-adapter>
          
          <int:transformer id="annotationTransformer" ref="annotationAdapter" input-channel="annotatorChannel" method="annotate" output-channel="destinationChannel"  />
          When I try to send about 1000 audit events ( more than the queue capacity), it sends them to the final destination using the method handleAuditEvent as described above. But some of the events are missing... that is, it skips over some events. I have a feeling that this happens when one of the queue is full. It probably waits for the queue to free up, and in the process the event(s) is lost. Is there a way to combat this scenario?


          Update: I even tried making the second queue a direct channel, ( so now I have the first queue spitting out the messages to the direct channel, which sends them to the destination), but it still seems like some messages are lost in the first queue itself since I do not see them in the destination, and I see the same ones missing in the first queue ( the annotator channel).

          Comment

          Working...
          X