[rabbitmq-discuss] Subscribing an Exchange with RabbitHub
Lijo Sebastian
lijo at citrusinformatics.com
Wed Nov 13 05:20:30 GMT 2013
Okai. I got the url with hub.challenge=<token> as a querystring.
How should i return this challenge token back to webserver?
Currently i tried with
// Retrieves challengetoken
string challenge = request.QueryString["hub.challenge"];
// Converting the text to byteArray
byte[] challengeBuffer = Encoding.UTF8.GetBytes(challenge);
// Writes buffer into the response body.
Response.Body.Write(challengeBuffer, 0, challengeBuffer.Length);
But this is the result i got..
* upload completely sent off: 117 out of 117 bytes
< HTTP/1.1 500 Internal Server Error
< Server: nginx/1.1.19
< Date: Wed, 13 Nov 2013 05:15:09 GMT
< Content-Length: 0
< Connection: keep-alive
<
* Connection #0 to host xxxx.yyyy.com left intact
* Closing connection #0
What could be the possible error here?
Regards,
Lijo Sebastian
Senior Software Engineer
Citrus Informatics (India) Pvt Ltd.
From: Brett Cameron
Sent: Wednesday, November 13, 2013 10:07 AM
To: rabbitmq-discuss
Subject: Re: [rabbitmq-discuss] Subscribing an Exchange with RabbitHub
That's correct. As per the documentation you can also specify a duration for the subscription (after which it will be expired), etc.
Just be sure to note that the initial challenge is a GET; messages are then forwarded to the URL using POST.
On 13/11/2013 5:31 PM, "Lijo Sebastian" <lijo at citrusinformatics.com> wrote:
Oh, so can i specify any url as a callback url and satisfy request verification.
any client url that can do verification on this request right?
Regards,
Lijo Sebastian
Senior Software Engineer
Citrus Informatics (India) Pvt Ltd.
From: Brett Cameron
Sent: Wednesday, November 13, 2013 2:05 AM
To: Discussions about RabbitMQ
Subject: Re: [rabbitmq-discuss] Subscribing an Exchange with RabbitHub
Lijo,
The error indicates that your web server at rabbitmq.citrus.com did not respond correctly to the initial challenge request. When a subscription is requested, RabbitHub sends a challenge request (HTTP GET) to the specified URL. The challenge request sends a token and the web server is expected to respond to the challenge request by sending back the same token in the response body. Assuming this process completes successfully the subscription will be activated. Once the subscription has been activated, RabbitHub will send to the subscription URL any messages matching the subscription (note that messages are sent using HTTP POST, not GET).
Brett
On Wed, Nov 13, 2013 at 1:43 AM, Lijo Sebastian <lijo at citrusinformatics.com> wrote:
Hi,
Please guide me through.
I am using RabbitHub plugin for RESTish way of publishing messages.
Creating and Deleting Exchanges or Queues are working fine.
Also able to publish message with http post method to queues subscribed through amqp.
But how to achieve subscribe with RabbitHub.
I tried the example available with RabbitHub tutorial. Added my call back url . Got Error.
What could be the possibilities of the below shown error?
Thanks in Advance!!!
Error :
Request verification failed: challenge_mismatch* Connection #0 to host rabbitmq
citrus.com left intact
* Closing connection #0
Regards,
Lijo Sebastian
Senior Software Engineer
Citrus Informatics (India) Pvt Ltd.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
------------------------------------------------------------------------------
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
--------------------------------------------------------------------------------
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131113/7928bda2/attachment.htm>
More information about the rabbitmq-discuss
mailing list