[ 
https://issues.apache.org/jira/browse/ARTEMIS-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156841#comment-17156841
 ] 

Justin Bertram commented on ARTEMIS-2842:
-----------------------------------------

It appears you're not escaping the colon characters in your headers as directed 
by the [STOMP 1.2 
specification|https://stomp.github.io/stomp-specification-1.2.html#Value_Encoding]
 which says:
{quote}
The commands and headers are encoded in UTF-8. All frames except the 
{{CONNECT}} and {{CONNECTED}} frames will also escape any carriage return, line 
feed or colon found in the resulting UTF-8 encoded headers.

Escaping is needed to allow header keys and values to contain those frame 
header delimiting octets as values. The {{CONNECT}} and {{CONNECTED}} frames do 
not escape the carriage return, line feed or colon octets in order to remain 
backward compatible with STOMP 1.0.

C style string literal escapes are used to encode any carriage return, line 
feed or colon that are found within the UTF-8 encoded headers. When decoding 
frame headers, the following transformations MUST be applied:

*  {{\r}} (octet 92 and 114) translates to carriage return (octet 13)
*  {{\n}} (octet 92 and 110) translates to line feed (octet 10)
*  {{\c}} (octet 92 and 99) translates to {{:}} (octet 58) 
*  \ \ (octet 92 and 92) translates to \ (octet 92)
{quote}
Try using this instead:
{noformat}
destination: demo\c\cpitch.demo
{noformat}

> Point-to-point subscription queue name not parsed correctly - STOMP
> -------------------------------------------------------------------
>
>                 Key: ARTEMIS-2842
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2842
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker, STOMP
>    Affects Versions: 2.13.0
>         Environment: 
> [documentation|https://activemq.apache.org/components/artemis/documentation/latest/address-model.html]
>            Reporter: nicolasbelanger
>            Assignee: Justin Bertram
>            Priority: Major
>
> Hello,
> I am trying to have clients connect to a queue configured in broker.xml (not 
> auto-created by the client) over STOMP.  Connections always fail with
> DEBUG o.a.a.a.c.p.s.StompConnection [Thread-3 (activemq-netty-threads)] 
> STOMP(/127.0.0.1:55122, f2bb6e64):OUT >> StompFrame[command=ERROR, 
> headers=\{message=AMQ339001 Destination does not exist pitch.demo}, content= 
> null, bytes= []
>  
> Excerpt from my broker.xml:
> <{color:#0033b3}acceptors{color}>
>  <{color:#0033b3}acceptor 
> {color}{color:#174ad4}name{color}{color:#067d17}="STOMPWssMicroservice"{color}>
>  
> tcp://localhost:61612?sslEnabled=true;needClientAuth=true;verifyHost=false;enabledProtocols=TLSv1.2;keyStoreProvider=PKCS12;keyStorePath=/myfile.p12;keyStorePassword=mypassword;trustStorePath=/myfile.pfx;trustStorePassword=mypassword;protocols=STOMP;anycastPrefix=queue/;multicastPrefix=topic/;
>  </{color:#0033b3}acceptor{color}>{color:#8c8c8c}
> {color} </{color:#0033b3}acceptors{color}>
> <{color:#0033b3}wildcard-addresses{color}>
>  <{color:#0033b3}delimiter{color}>/</{color:#0033b3}delimiter{color}>
>  </{color:#0033b3}wildcard-addresses{color}>
> {color:#8c8c8c}
> {color} <{color:#0033b3}address-settings{color}>
>  <{color:#0033b3}address-setting 
> {color}{color:#174ad4}match{color}{color:#067d17}="#"{color}>
> <{color:#0033b3}expiry-address{color}>expiry</{color:#0033b3}expiry-address{color}>
>  
> <{color:#0033b3}redelivery-delay{color}>0</{color:#0033b3}redelivery-delay{color}>
>  
> <{color:#0033b3}redelivery-delay-multiplier{color}>1.0</{color:#0033b3}redelivery-delay-multiplier{color}>
>  
> <{color:#0033b3}max-delivery-attempts{color}>1</{color:#0033b3}max-delivery-attempts{color}>
>  {color:#8c8c8c}<!-- with -1 only the global-max-size is in use for limiting 
> -->
> {color} 
> <{color:#0033b3}max-size-bytes{color}>104857600</{color:#0033b3}max-size-bytes{color}>
>  
> <{color:#0033b3}page-size-bytes{color}>10485760</{color:#0033b3}page-size-bytes{color}>
>  
> <{color:#0033b3}address-full-policy{color}>PAGE</{color:#0033b3}address-full-policy{color}>
>  
> <{color:#0033b3}page-max-cache-size{color}>10</{color:#0033b3}page-max-cache-size{color}>
>  
> <{color:#0033b3}send-to-dla-on-no-route{color}>false</{color:#0033b3}send-to-dla-on-no-route{color}>
>  
> <{color:#0033b3}slow-consumer-threshold{color}>-1</{color:#0033b3}slow-consumer-threshold{color}>
>  
> <{color:#0033b3}slow-consumer-policy{color}>NOTIFY</{color:#0033b3}slow-consumer-policy{color}>
>  
> <{color:#0033b3}slow-consumer-check-period{color}>5</{color:#0033b3}slow-consumer-check-period{color}>
>  
> <{color:#0033b3}message-counter-history-day-limit{color}>1</{color:#0033b3}message-counter-history-day-limit{color}>
>  
> <{color:#0033b3}auto-create-queues{color}>true</{color:#0033b3}auto-create-queues{color}>
>  
> <{color:#0033b3}auto-delete-created-queues{color}>false</{color:#0033b3}auto-delete-created-queues{color}>
>  
> <{color:#0033b3}auto-delete-queues-delay{color}>60000</{color:#0033b3}auto-delete-queues-delay{color}>
>  
> <{color:#0033b3}auto-delete-queues-message-count{color}>0</{color:#0033b3}auto-delete-queues-message-count{color}>
>  
> <{color:#0033b3}auto-create-addresses{color}>false</{color:#0033b3}auto-create-addresses{color}>
>  
> <{color:#0033b3}management-browse-page-size{color}>200</{color:#0033b3}management-browse-page-size{color}>
>  
> <{color:#0033b3}default-max-consumers{color}>-1</{color:#0033b3}default-max-consumers{color}>
>  
> <{color:#0033b3}default-address-routing-type{color}>MULTICAST</{color:#0033b3}default-address-routing-type{color}>
>  
> <{color:#0033b3}default-queue-routing-type{color}>MULTICAST</{color:#0033b3}default-queue-routing-type{color}>
>  
> <{color:#0033b3}default-consumer-window-size{color}>4194304</{color:#0033b3}default-consumer-window-size{color}>
>  </{color:#0033b3}address-setting{color}>
>  </{color:#0033b3}address-settings{color}>
>  </{color:#0033b3}address{color}>
>  <{color:#0033b3}address 
> {color}{color:#174ad4}name{color}{color:#067d17}="demo"{color}>
>  <{color:#0033b3}anycast{color}>
>  <{color:#0033b3}queue 
> {color}{color:#174ad4}name{color}{color:#067d17}="pitch.demo"{color}/>
>  </{color:#0033b3}anycast{color}>
>  </{color:#0033b3}address{color}>
> </{color:#0033b3}addresses{color}>
>  
> From the client side, this STOMP frame is sent to the broker for subscription:
> [1.2][1.1]Frame: <SUBSCRIBE>
> accept-version:1.2
> client-id:pitcherclient0
> priority:1
> destination:queue/demo/pitch.demo
> ack:auto
> <body>null<body>
>  
> The 
> [documentation|https://activemq.apache.org/components/artemis/documentation/latest/address-model.html]
>  states that a FQQN should be used:
> destination: demo::pitch.demo
> but that still gives me the same destination not found error. In this case, 
> the "::" are stripped from the destination name before they are parsed by the 
> CompositeAddress. The above address becomes:
> demopitch.demo
> which cannot be found in the registered addresses.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to