Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-5106

Exception thrown from plugin in beforeSend method is not propagated to AMQP tx clients on commit

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Context:
      The following behaviour has been seen while developing a plugin intended to limit the size of messages accepted by Artemis.
      When a message size exceeds the configured size limit, the plugin throws an exception in the beforeSend method to stop further message processing within Artemis.

      Details:
      The plugin has been tested and works correctly on the following scenarios:

      • CORE protocol, standard & large messages (transacted session + auto-acknowledgement)
      • OPENWIRE protocol, standard & large messages (transacted session + auto-acknowledgement)
      • AMQP protocol, standard & large messages (auto-acknowledgement)

      However, two issues were identified when using the AMQP protocol :

      • the client does not receive any exception from Artemis when the session is transacted
      • if the received message is a large message, it is created on the filesystem but becomes an orphan, with no link to an existing message in the Artemis journal. 
        This occurs in both transacted and auto-acknowledge session cases.

      Client-side:
      The JMS AMQP client tested was QPid JMS 1.12.1.
      From the QPid side, it seems that the transacted session is successfully commited, and no error is received.
      Therefore, it seems the error is not properly propagated to the client by Artemis.

      Test case:

      A test case is provided in attachment, including both CORE and AMQP protocol scenarios.

      Before running it, add the test file into the artemis folder :

      • tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tabish Timothy A. Bish
            jpbriquet Jean-Pascal Briquet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment