0

I am polling on JMS queue using JMS consume component in mule-4. when there are no message in queue it is printing error log. I want avoid the error log. can you some suggest how can we acheive this in mule-4

enter image description here

<flow name="docusign-message-reprocessing-reports-subflow" doc:id="f3ffe923-ee3e-4e0d-8a29-ec874b9755d7" >
        <scheduler doc:name="Scheduler" doc:id="ff715c36-be3e-4f79-bdc9-db7934c75985" >
            <scheduling-strategy >
                <fixed-frequency timeUnit="HOURS" frequency="3" startDelay="1"/>
            </scheduling-strategy>
        </scheduler>
        <logger level="INFO" doc:name="Logger" doc:id="66ef28f0-c4a6-4bec-b824-a51ce7e8ea79" message="@@@@ ---&gt; scheduler triggered"/>
        <jms:consume doc:name="Consume" doc:id="e63155ec-7563-4409-bd83-c66e6e1c792a" config-ref="AMQ-DocuSign-Connector" destination="#[Mule::p('amq.docusign.reports.bqueue')]" maximumWaitUnit="SECONDS" maximumWait="10">
            <jms:consumer-type>
                <jms:queue-consumer />
            </jms:consumer-type>
        </jms:consume>
        <logger level="INFO" doc:name="Logger" doc:id="47cd3399-a84d-476e-b065-b58c6d94079d" message="printing payload #[payload]"/>
        <choice doc:name="Choice" doc:id="ea7cbccb-6b47-456b-a2cb-c67561b53917">
            <when expression="#[!isEmpty(payload)]">
                <logger level="INFO" doc:name="Logger" doc:id="b8c49215-383f-45e3-aaf3-2b9511a53828" message="#[&quot;Moving messages from DLQ&quot; ++ Mule::p('amq.docusign.reports.bqueue')  as String ++   &quot;to&quot; ++ Mule::p('amq.docusign.reports.topic') as String]" />
                <jms:publish doc:name="Publish" doc:id="44425d09-4ced-4a9d-a1c8-9c6259a2b6c9" destination="${amq.docusign.reports.topic}" config-ref="AMQ-DocuSign-Connector" destinationType="TOPIC" />            
</when>
                <otherwise>
                    <logger level="INFO" doc:name="Logger" doc:id="eb5f2d82-f0a3-4a8d-93f0-25ac4784e0fc" message="#[&quot;No message found in DLQ&quot; ++  Mule::p('amq.docusign.reports.bqueue')  as String ++  &quot;!&quot;]" />
                </otherwise>
        </choice>
        <error-handler >
            <on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue" doc:id="6443cb12-3b4e-4217-b559-f4ed22d2d27f" >
                <logger level="INFO" doc:name="Logger" doc:id="db46b10a-2203-4acb-b65d-07cd674b3373" message="no message found in Dead letter Queue"/>
            </on-error-continue>
        </error-handler>

I am getting the following error message since the queue is empty ther are no messages to retrieve

Message               : Failed to retrieve a Message. Operation timed out after 10000 milliseconds
Element               : docusign-message-reprocessing-reports-subflow/processors/1 @ wbg-itsen-docusign-connect:docusign-reports-reprocess.xml:16 (Consume)
Element DSL           : <jms:consume doc:name="Consume" doc:id="e63155ec-7563-4409-bd83-c66e6e1c792a" config-ref="AMQ-DocuSign-Connector" destination="#[Mule::p('amq.docusign.reports.bqueue')]" maximumWaitUnit="SECONDS" maximumWait="10">
<jms:consumer-type>
<jms:queue-consumer></jms:queue-consumer>
</jms:consumer-type>
</jms:consume>
Error type            : JMS:TIMEOUT
FlowStack             : at docusign-message-reprocessing-reports-subflow(docusign-message-reprocessing-reports-subflow/processors/1 @ wbg-itsen-docusign-connect:docusign-reports-reprocess.xml:16 (Consume))

  (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

i dont want this repetetive message to print in logs every time scheduler is trigger I just want to discard the flow if there are no messages in queue.

4
  • You said you wanted to disable logging with on-error continue, but you have provided a ss of your consume operation. Also it is better if you provide the xml snipped instead of screenshot. Commented Aug 7, 2023 at 9:33
  • @HarshankBansal added xml code for your reference Commented Aug 7, 2023 at 11:23
  • You mentioned that the objective of the question is to avoid an error but you didn't mention the error. Please add it to the question so we know which error exactly you are trying to avoid. Commented Aug 7, 2023 at 11:26
  • 2
    @kushmagonna Have you tried unchecking the "logException" option in the "on-error continue" scope? Commented Aug 7, 2023 at 14:43

1 Answer 1

1

Your <on-error-continue> shows logException="true". Change to false to avoid this error log. This is the same as unchecking "Log exception" in the "On Error Continue" scope that was suggested by @jarus in the question comments.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.