<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Duplicate message reception in message catching event in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/duplicate-message-reception-in-message-catching-event/m-p/156515#M110758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a cronjob that periodically (every 5s) tries to send a message to an arbitrary process execution waiting on an intermediate message catching event. In each run, the cronjob determines waiting process executions via &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;RuntimeService.createExecutionQuery().messageEventSubscriptionName(messageName).list()&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and sends the message via &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;RuntimeService.messageEventReceived(..)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We experience the odd behaviour that two subsequent cronjob runs (5s apart) sometimes deliver the message to the same process execution (i.e. the execution query yields identical execution IDs), leading to an SQL exception during insert into ACT_RU_EXECUTION (ORA-02291: integrity constraint (ACT_FK_EXE_PROCINST) violated - parent key not found). There are no loops in our process, every execution expects only a single message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would expect that the process execution that received a message immediately gets removed from the message event listener list, so duplicate message reception is impossible. Can someone explain to me at which point in time the RuntimeService.messageEventReceived persists the information that the message was successfully delivered? Is this only done when the receiving process execution yields its thread?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/Dennis&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 14:18:38 GMT</pubDate>
    <dc:creator>waldo</dc:creator>
    <dc:date>2013-10-02T14:18:38Z</dc:date>
    <item>
      <title>Duplicate message reception in message catching event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/duplicate-message-reception-in-message-catching-event/m-p/156515#M110758</link>
      <description>We have a cronjob that periodically (every 5s) tries to send a message to an arbitrary process execution waiting on an intermediate message catching event. In each run, the cronjob determines waiting process executions via RuntimeService.createExecutionQuery().messageEventSubscriptionName(messageNam</description>
      <pubDate>Wed, 02 Oct 2013 14:18:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/duplicate-message-reception-in-message-catching-event/m-p/156515#M110758</guid>
      <dc:creator>waldo</dc:creator>
      <dc:date>2013-10-02T14:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate message reception in message catching event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/duplicate-message-reception-in-message-catching-event/m-p/156516#M110759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible that the process execution takes more than 5 seconds? When the message is received a transaction is started and the process is executed until the next wait state. Only then the message event listener is removed from the database. If you have some long running logic you could add async behaviour to complete the transaction faster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 19:23:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/duplicate-message-reception-in-message-catching-event/m-p/156516#M110759</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-10-03T19:23:21Z</dc:date>
    </item>
  </channel>
</rss>

