activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Ebbesen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-4756) {{/}}s in queue name converted to {{.}} when using REST API to create messages on queues
Date Mon, 30 Sep 2013 18:49:26 GMT
Eric Ebbesen created AMQ-4756:
---------------------------------

             Summary: {{/}}s 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 {{&#47;}} 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)

Mime
View raw message