Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.0.0
    • Fix Version/s: AGING_TO_DIE
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu/Debian, JDK 1.6

      Description

      I'm not sure it is bug or I'm just dumb so sorry if I messed up. I tried 5.0 Snapshot with simple python client (included below) and it acts strange. And so localhost:8161/demo does. Getting first message is no problem but then AMQ returns HTTP status 204 (Not changed) and empty message body - until AMR restarted. What I'm doing wrong?

      Output:
      [test message2] -> http://localhost:8161/demo/message/queue23
      [test message3] -> http://localhost:8161/demo/message/queue23
      [test message4] -> http://localhost:8161/demo/message/queue23
      http://localhost:8161/demo/message/queue23?type=queue&timeout=100 ->
      STATUS: 200
      test message2
      http://localhost:8161/demo/message/queue23?type=queue&timeout=100 ->
      STATUS: 204
      http://localhost:8161/demo/message/queue23?type=queue&timeout=100 ->
      STATUS: 204

      Program (very short):
      ==========
      #!/usr/bin/python
      import httplib2
      import urllib
      from time import *
      BASE = "http://localhost:8161/demo/"
      client = httplib2.Http(".cache")
      dtype = "queue"
      def SendMessage(queue, body):
      url = BASE + "message/" + queue
      print "[%s] -> %s" % (body, url)
      body = urllib.urlencode(

      {"type": dtype, "body" : body}

      )
      return client.request(url, "POST", body,
      headers=

      {"Content-type": "application/x-www-form-urlencoded"}

      )
      def GetMessage(queue, method):
      url = BASE + "message/" + queue + "?" + urllib.urlencode(

      {"type": dtype, "timeout": 100}

      )
      print url,'->'
      headers, body = client.request(url, method, None, None)
      print 'STATUS:',headers["status"]
      return body
      queue = "queue23"
      SendMessage(queue, "test message2")
      SendMessage(queue, "test message3")
      SendMessage(queue, "test message4")
      sleep(1)
      print GetMessage(queue, "GET")
      print GetMessage(queue, "GET")
      print GetMessage(queue, "GET")

        Activity

        Hide
        vsevolod added a comment -

        Python client attached.

        Show
        vsevolod added a comment - Python client attached.

          People

          • Assignee:
            Unassigned
            Reporter:
            vsevolod
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development