You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Eric Ebbesen (JIRA)" <ji...@apache.org> on 2013/09/30 20:51:24 UTC
[jira] [Updated] (AMQ-4756) / in queue name converted to . when
using REST API to create messages on queues
[ https://issues.apache.org/jira/browse/AMQ-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Ebbesen updated AMQ-4756:
------------------------------
Summary: / in queue name converted to . when using REST API to create messages on queues (was: /s in queue name converted to . when using REST API to create messages on queues)
> / in queue name converted to . when using REST API to create messages on queues
> -------------------------------------------------------------------------------
>
> Key: AMQ-4756
> URL: https://issues.apache.org/jira/browse/AMQ-4756
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.8.0
> Environment: jdk 1.6
> curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
> Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
> Reporter: Eric Ebbesen
> Priority: Minor
>
> My 5.0.8 ActiveMQ queue is named queue/andburn. Using
> {noformat}
> curl -u admin:admin -d 'body="Aardvark"' "http://localhost:8161/api/message/queue/andburn?type=queue"
> {noformat}
> or
> {noformat}
> curl -u admin:admin -d 'body="Aardvark"' 'http://localhost:8161/api/message/queue/andburn?type=queue'
> {noformat}
> creates a new queue {{queue.andburn}}. When I escape {{/}} like {{\/}} I get {{queue\.andburn}}. When I omit {{type=queue}} I don't see my message added to my existing queue. Same when I use {{/}} or {{%2F}} to represent slashes.
> Note: all escaping was done after queue in the URI, e.g.
> {noformat}
> "http://localhost:8161/api/message/queue\/andburn?type=queue"
> {noformat}
> [The ActiveMQ REST|http://activemq.apache.org/rest.html] page was not helpful in addressing this.
> This is also happening when sending requests to ActiveMQ via a Ruby script using the RestClient gem.
> {noformat}
> require 'rest_client'
> require 'rubygems'
> require 'json'
> # parse input
> iterations = ARGV[0] || 5
> iterations = iterations.to_i
> puts "Will process #{iterations} times"
> @user = 'admin'
> @pass = 'admin'
> @host = 'localhost'
> @port = '8161'
> @queue = "queue/andburn"
> @post_ws = "/api/message/#{@queue}?type=queue"
> (1..iterations).each do |modifier|
> payload = "#{modifier}watch_topic"
> url = "http://#{@user}:#{@pass}@#{@host}:#{@port}#{@post_ws}"
> response = RestClient.post(url, 'body' => payload)
> puts "#{response}: #{response.class}"
> end
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1#6144)