[
https://issues.apache.org/jira/browse/ARTEMIS-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17055478#comment-17055478
]
Piotr Klimczak edited comment on ARTEMIS-2649 at 3/10/20, 12:40 AM:
--------------------------------------------------------------------
Just confirmed with local fix, when using composite address instead of filter,
it works in all cases.
This is similar implementation like for ARTEMIS-2420.
Fix example:
{code:java}
private boolean sendToDeadLetterAddress(final Transaction tx,
final MessageReference ref,
final SimpleString deadLetterAddress)
throws Exception {
if (deadLetterAddress != null) {
createDeadLetterResources();
Bindings bindingList =
postOffice.lookupBindingsForAddress(deadLetterAddress);
if (bindingList == null || bindingList.getBindings().isEmpty()) {
ActiveMQServerLogger.LOGGER.messageExceededMaxDelivery(ref,
deadLetterAddress);
ref.acknowledge(tx, AckReason.KILLED, null);
} else {
// FIX IS HERE
AddressSettings addressSettings =
server.getAddressSettingsRepository().getMatch(getAddress().toString());
SimpleString toDeadLetterAddress =
CompositeAddress.toFullyQualified(deadLetterAddress,
addressSettings.getDeadLetterQueuePrefix().concat(getAddress()).concat(addressSettings.getDeadLetterQueueSuffix()));
ActiveMQServerLogger.LOGGER.messageExceededMaxDeliverySendtoDLA(ref,
toDeadLetterAddress, name);
move(tx, toDeadLetterAddress, null, ref, false, AckReason.KILLED,
null);
return true;
}
} else {{code}
was (Author: nannou9):
Just confirmed with local fix, when using composite address instead of filter,
it works in all cases.
This is similar implementation like for ARTEMIS-2420.
> Auto-create DLQ doesn't seem to work for JMS addresses
> ------------------------------------------------------
>
> Key: ARTEMIS-2649
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2649
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.12.0
> Environment: Centos 7 container in OKD with Java 8.
> Reporter: Piotr Klimczak
> Priority: Major
>
> [~jbertram], first of all thanks a lot for ARTEMIS-2587 implementation.
> This was a must for me to switch to Artemis.
> In past I have even tried to implement it in Artermis, but having no
> previous experience with it, only with your PR I understood how nicely and
> easily it can be implemented and how much I have overcomplicated it.
> So I am testing 2.12.0 snapshot as I am really interested in work done under
> ARTEMIS-2587.
> I am connecting using open wire protocol using camel-jms component, having
> replaced old AMQ5 with Artermis.
> On failed consumption, I can see queue being created under DLQ address with
> multicast and filter _AMQ_ORIG_ADDRESS = 'some.queue'.
> However it is empty and message is lost.
> So the observation is that:
> # Queue is being created
> # Message is lost and logs are not indicating anything
> I have not debugged it yet, this is early observation.
> I might do more investigation if time will allow.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)