4

Inbound pooling-frequency is 43200000. It used to run twice a day but failed to insert some rows in Oracle database because of below issue.

Please Advice.

Here is the error message,

********************************************************************************
Message               : The queue for 'SEDA Stage PA_Trans.stage1' did not accept new event within 30000 MILLISECONDS. Message payload is of type: CaseInsensitiveHashMap
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------

Exception stack is:

1. The queue for 'SEDA Stage PA_Trans.stage1' did not accept new event within 30000 MILLISECONDS. Message payload is of type: CaseInsensitiveHashMap (org.mule.api.service.FailedToQueueEventException)
  org.mule.processor.SedaStageInterceptingMessageProcessor:139 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/service/FailedToQueueEventException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.api.service.FailedToQueueEventException: The queue for 'SEDA Stage PA_Trans.stage1' did not accept new event within 30000 MILLISECONDS. Message payload is of type: CaseInsensitiveHashMap
                at org.mule.processor.SedaStageInterceptingMessageProcessor.enqueue(SedaStageInterceptingMessageProcessor.java:139)
                at org.mule.processor.SedaStageInterceptingMessageProcessor.processNextAsync(SedaStageInterceptingMessageProcessor.java:102)
                at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:97)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
TheCodingFrog
  • 3,406
  • 3
  • 21
  • 27
user1927648
  • 183
  • 5
  • 14

2 Answers2

2

The inbound pooling frequency is too long. Your SEDA stage is becoming a slow consumer and it's not meant to become it.

You have a number of options like increasing the stage timeout. However I wouldn't rely on a very unexpected use of SEDA and rather just use a vm (or jms, amqp, etc) queue in combination with the requestor module and poll or quartz.

Víctor Romero
  • 5,107
  • 2
  • 22
  • 32
2

The SEDA queue is used to queue messages between the inbound message processor and the rest of the flow, when your flow processing strategy is asynchronous. As suggested in the other answer, if you used a queueing mechanism such as Active MQ and set the receiver flow processing strategy to synchronous, you will avoid this issue.

For example:

  • Flow 1: JDBC inbound endpoint -> JMS queue outbound endpoint
  • Flow 2: JMS queue inbound endpoint -> processing

Flow 2 uses synchronous processing strategy so all queueing is done by the JMS server and there is no use of SEDA queues.

More information about threading in Mule: https://docs.mulesoft.com/mule-user-guide/v/3.7/tuning-performance

Clinton Murdoch
  • 453
  • 4
  • 9