1

I am using Artemis 2.7.0.redhat-00056 (AMQ 5.11 I think)

One of the camel routes was set up ages ago. It sends XML on a queue, which is then handled in a bean.

So it uses JMS style code:

    producer = session.createProducer(destination);
    producer.setDeliveryMode(DeliveryMode.PERSISTENT);
    ...
    TextMessage message = session.createTextMessage(xStream.toXML(corMessage));
    producer.send(message);

This works 99% of the time, but today we started getting:

    Caused by: java.lang.IndexOutOfBoundsException: Error reading in simpleString, length=6702096 is greater than readableBytes=963134
    at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)

In addition to this, the warning:

    AMQ212054: Destination address=... is blocked. If the system is configured to block make sure you consume messages on this configuration.

To fix this, I went into the docker and checked out our /amq/broker/data/large-messages folder, and moved all those files somewhere else. It threw a bunch of exceptions, but new messages seem to be going through now.

But I am still getting the AMQ212054 'destination blocked' warning.

So, how do I

a) get rid of the warning

b) fix this going forward?

I have looked at the docs, but I don't see anything in particular that would help. There's a minLargeMessageSize field, but would setting it make any difference? Then would I be checking the size of the XML before sending, and then have some if/else statement, to either send with producer.send(message); or as a ByteMessage, like section 9.4/9.5, if it's a 'large' message?

EDIT: (FROM INSIDE DOCKER)

  ...
  <max-disk-usage>90</max-disk-usage>
  ...

[root@409a74d7eadd /]# df -h
Filesystem                              Size  Used Avail Use% Mounted on
/dev/mapper/docker-253:2-268789825-123   10G  2.8G  7.3G  28% /
tmpfs                                    64M     0   64M   0% /dev
tmpfs                                    12G     0   12G   0% /sys/fs/cgroup
/dev/mapper/centos-root                  36G   14G   23G  37% /temp
djb
  • 1,635
  • 3
  • 26
  • 49
  • Does this answer your question? [Error in Spring Boot JMS Producer: AMQ212054 Destination address is blocked](https://stackoverflow.com/questions/53817511/error-in-spring-boot-jms-producer-amq212054-destination-address-is-blocked) – Justin Bertram Dec 08 '21 at 18:00
  • I don't think so. is PAGE for the match="#" address-settings (i.e. defaults). Also, not running out of disk space. – djb Dec 09 '21 at 08:40
  • Keep in mind that on large disks it may not immediately look like you're running out of disk space. The default `max-disk-usage` is `90` so for example on a system with a 1TB disk the broker would start blocking when there was still 100GB of disk space left. What value are you using for your `max-disk-usage` value in `broker.xml`, what size is your disk, and how much is left when it starts to block? – Justin Bertram Dec 09 '21 at 15:16
  • I've added an edit above. It's from inside a docker. But it still looks like there's plenty of space. – djb Dec 09 '21 at 15:28
  • The tag "2.7.0.redhat-00056" comes from Red Hat AMQ 7.3.0 which is based on Apache ActiveMQ Artemis. This release of AMQ is fairly old at this point. It came out in May of 2019. There have been 16 more releases since then. Later releases actually include more detail in the `AMQ212054` log message to help diagnose this issue. I recommend you move to the latest version (i.e. 7.9.1) and see how it goes. At the very least you'll get more info in the logging which will help clarify the situation. – Justin Bertram Dec 09 '21 at 16:16
  • Ok will try upgrade AMQ next week, thanks. – djb Dec 10 '21 at 08:54
  • Did you ever get this sorted? – Justin Bertram Dec 22 '21 at 22:07
  • AMQ is baked into my container, so it's gonna need a big reboot for the upgrade. To postpone the big reboot, I did a temporary hack: changed queue name, and as per some other answer, added ?minLargeMessageSize=8500000 to the ActiveMQJMSConnectionFactory and restarted service. Seems to be working so far. Can't seem to unblock the old queue though. – djb Dec 23 '21 at 11:13

0 Answers0