1. ActiveMQ
  2. AMQ-1529

The blob of a blob-message will never be deleted


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0, 5.1.0, 5.2.0
    • Fix Version/s: 5.6.0
    • Component/s: Message Store
    • Labels:
    • Environment:

      Windows vista, java 6

    • Patch Info:
      Patch Available


      In a blob-message you can specify that the broker can delete the blob if the message is delivered or outdated.
      But actual onle the message with the reference to the blob is deletet, the use-data in the repository not. The problem is the separation of the blob from the message itself.

      My idea is to extend the persistence store to check at delete if it is a blob message and then delete the blob from the repository. I have done this in the jdbc- and kaha message store (see patch).

      JDBC message store:

      • created a new table with all blob url`s which must be delete if the message is deleted
        ID (primary Key) MSGID (reference to ID in MESSAGE table) URL
      • on message add check if it is a blob-message and if the broker must delete the message add the information to the new table
      • in cleanup a query on that table finds all urls with no existing reference in the MESSAGE table (becaus the message is deleted) and then deletes this blobs

      KAHA message store:

      • TopicSubAck has a new attribute remotBlobUrl
      • on message add check if it is a blob-message and if the broker must delete the message add the url to the TopicSubAck
      • on acknowledge at delete check if the attribute is set an if it is set delete the blob


      • add a similar mechanism to the other message stores
      • only the first delete is successfull, every other delete request ends in an 500 errorcode from the server


        Marco Buss created issue -
        Rob Davies made changes -
        Field Original Value New Value
        Assignee Rob Davies [ rajdavies ]
        Rob Davies made changes -
        Fix Version/s 5.3.0 [ 11914 ]
        Gary Tully made changes -
        Fix Version/s 5.3.0 [ 11914 ]
        Fix Version/s 5.4.0 [ 12110 ]
        Rob Davies made changes -
        Fix Version/s 5.4.0 [ 12110 ]
        Fix Version/s NEEDS_REVIEWED [ 12186 ]
        Jeff Turner made changes -
        Project Import Fri Nov 26 22:32:02 EST 2010 [ 1290828722158 ]
        Claus Ibsen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Rob Davies [ rajdavies ] Claus Ibsen [ davsclaus ]
        Fix Version/s 5.6.0 [ 12317974 ]
        Fix Version/s NEEDS_REVIEWED [ 12315630 ]
        Resolution Fixed [ 1 ]


          • Assignee:
            Claus Ibsen
            Marco Buss
          • Votes:
            1 Vote for this issue
            4 Start watching this issue


            • Created: