Question

We have this queue where we get some large files and many small ones, so we use divert to get the large files onto their own queue. The divert is exclusive. However see that under the large messages folder there are two copies of the message (which is a bytesmessage - file with properties) for every large message diverted. Once we consume the diverted message one of them goes away, but the other is left behind until hornet is restarted. When it is restarted we see messages like the following:

[org.hornetq.core.server] HQ221018: Large message: 19,327,352,827 did not have any associated reference, file will be deleted

We use streaming over JMS to put them in and get them out.

Below is the divert configuration. By the way, large size is considered everything over 100k in our HornetQ.

Are we missing any thing or did we just discover a bug?

HornetQ version is 2.3.0

<diverts>
    <divert name="large-message-divert">      
        <routing-name>large-message-divert</routing-name>
        <address>jms.queue.FileDelivery</address>
        <forwarding-address>jms.queue.FileDelivery.large</forwarding-address>
        <filter string="_HQ_LARGE_SIZE IS NOT NULL AND _HQ_LARGE_SIZE > 52428800"/>
        <exclusive>true</exclusive>
    </divert>
</diverts>
Was it helpful?

Solution

This is likely a bug fixed in a later release of hornetq, since there were at least 2 fixes since 2.3.0 to the current date when I wrote this answer:

HORNETQ-1292 - Delete large message from disk when message is dropped
HORNETQ-431 - Large Messages Files NOT DELETED on unbounded address
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top