Announcement Announcement Module
Collapse
No announcement yet.
failed to send message to channel '' within timeout: -1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • failed to send message to channel '' within timeout: -1

    Hi I am having an issue with timeouts after polling a jdbc message store for failed messages and attempting to re save the message back to the message store on a another failure.

    Here is a quick overview of the flow

    -Message comes to gateway
    -Attempt to send email
    -email authentication failure (expected failure as the java mail sender is configured incorrectly)
    -a Service activator sends a message through operation control-bus channel to stop EmailRetrySenderService from polling
    -save message to message store

    -A poller configured every 2 minutes will then send a start message to restart the EmailRetrySenderService
    -message is retrieved from message store
    -message is passed off to gateway
    -attempt to send email
    -email authentication failure (expected failure as the java mail sender is configured incorrectly)
    -a Service activator sends a message through operation control-bus channel to stop EmailRetrySenderService from polling
    -save message back to message store <- failed to send message to channel 'storeEmailFailuresChannel' within timeout: -1


    Ive included the key pieces of my configuration. Any help would be greatly appreciated!

    Code:
    	<int:channel id="EmailErrorChannel" />
    		
    	<int:exception-type-router input-channel="EmailErrorChannel" default-output-channel="HandleExceptionsChannel">
    		<int:mapping channel="HandleEmailExceptionsChannel" exception-type="org.springframework.mail.MailAuthenticationException"/>
    	</int:exception-type-router>
    
    	<int:channel id="HandleEmailExceptionsChannel" />
    	
    	<int:service-activator input-channel="HandleEmailExceptionsChannel" ref="EmailExceptionsHandler" method="handle" output-channel="StopEmailSendingChannel"/>
    	
    	<int:channel id="StopEmailSendingChannel"/>	
    	<int:service-activator input-channel="StopEmailSendingChannel" output-channel="storeEmailFailuresChannel" ref="EmailControlService" method="stopEmailService" />
    	
    	<int:channel id="storeEmailFailuresChannel">
        		<int:queue message-store="emailFailureMessageStore"/>
    	</int:channel>   
    	
    	<int:service-activator id="EmailRetrySenderService" input-channel="storeEmailFailuresChannel" output-channel="ResendEmailReceiptChannel" ref="EmailRetryHandler" method="retry">
    			<int:poller fixed-rate="20000" max-messages-per-poll="1" />
    	</int:service-activator>
    	
    	<int:channel id="ResendEmailReceiptChannel" />	
    	<int:service-activator input-channel="ResendEmailReceiptChannel" ref="RetryEmailRequestService" method="relayEmail" />
    	
    	<int:inbound-channel-adapter channel="OperationChannel" ref="EmailControlService" method="startEmailCommand">
    		<int:poller cron="0 0/02 * * * *"  />
    	</int:inbound-channel-adapter>
    		
    	<int:control-bus input-channel="OperationChannel" />

  • #2
    It is hard to debug this with just a static configuration, and only a partial static configuration at that.

    On the face of it, it shouldn't be possible to get this error while sending to a QueueChannel with an indefinite send timeout (-1).

    I suggest you turn on debug logging; if you can't figure out what's going on, attach the log as a zip, together with the complete configuration.

    Comment


    • #3
      Am I getting this error because I'm stopping the EmailRetrySenderService before my message is passed to the storeEmailFailuresChannel which is backed by a JDBC message store queue? At this point my queue channel would have no subscribers is that correct?
      Yes; when you stop a poller, any existing in-process poll task will attempt to be cancelled (interrupted). Probably the first interruptible thing that occurs on the thread is the put into the QueueChannel's message store, when we attempt to acquire a lock.

      Looking at the code, that's the only way I can see us getting that message with no send timeout.

      We probably should log at DEBUG (at least), when we detect this interrupt. Please open a JIRA issue.

      Comment

      Working...
      X