[rabbitmq-discuss] Silverlight application with RabbitMQ

Aernouts Jens aernouts_jens at hotmail.com
Tue Apr 27 10:56:28 BST 2010


>> - Used Kaazing (http://www.kaazing.com/), a gateway to use Sockets with 
>> different languages (Silverlight, JavaScript, …). The problem here is 
>> that Kaazing only works with version 0.9.0 or 0.9.1 of the AMQP protocol, 
>> but RabbitMQ is only available with version 0.8.0.
>
> There is a fairly stable, just not-yet-official branch of RabbitMQ that 
> supports AMQP 0-9-1.  See https://dev.rabbitmq.com/wiki/Amqp091
>
I downloaded this version but I can't get it to work on my PC. When I run 
"rabbitmq-server.bat" I get the following:

*********************
Service control usage
*********************

rabbitmq-service help    - Display this help
rabbitmq-service install - Install the RabbitMQ service
rabbitmq-service remove  - Remove the RabbitMQ service

The following actions can also be accomplished by using
Windows Services Management Console (services.msc):

rabbitmq-service start   - Start the RabbitMQ service
rabbitmq-service stop    - Stop the RabbitMQ service
rabbitmq-service disable - Disable the RabbitMQ service
rabbitmq-service enable  - Enable the RabbitMQ service


c:\Temp\rabbitmq_server-0.0.0\sbin>rabbitmq-service.bat remove
C:\Program Files (x86)\erl5.7.5\erts-5.7.5\bin\erlsrv: Service RabbitMQ 
removed
from system.

c:\Temp\rabbitmq_server-0.0.0\sbin>rabbitmq-server

+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
|   v0.0.0  +---+   |
|                   |
+-------------------+
AMQP 0-9-1
Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial Technologies LLC., 
and R
abbit Technologies Ltd.
Licensed under the MPL.  See http://www.rabbitmq.com/

node          : rabbit at Laptop_2_64Bit
app descriptor: c:/Temp/rabbitmq_server-0.0.0/sbin/../ebin/rabbit.app
home dir      : C:\Users\Compufreak
cookie hash   : +H0L6sW4I41zYcsFymNsfg==
log           : C:/Users/Compufreak/AppData/Roaming/RabbitMQ/log/rabbit.log
sasl log      : 
C:/Users/Compufreak/AppData/Roaming/RabbitMQ/log/rabbit-sasl.log

database dir  : 
c:/Users/Compufreak/AppData/Roaming/RabbitMQ/db/rabbit-mnesia

starting worker pool 
...done
starting database 
...done
-- external infrastructure ready
starting exchange type registry 
...done
starting exchange type topic 
...done
starting exchange type headers 
...done
starting exchange type fanout 
...done
starting exchange type direct 
...done
starting internal event notification system 
...done
starting logging server 
...done
-- kernel ready
starting alarm handler 
...done
starting queue supervisor 
...done
starting node monitor 
...done
starting cluster router 
...done
-- core initialized
starting empty DB check 
...done
starting codec correctness check 
...done
starting exchange recovery 
...BOOT ER
ROR: FAILED
Reason: {function_clause,
            [{rabbit_exchange,recover_with_bindings,
                 [[],
                  [{exchange,
                       {resource,<<"/">>,exchange,<<>>},
                       direct,true,false,[]},
                   {exchange,
                       {resource,<<"/">>,exchange,<<"amq.direct">>},
                       direct,true,false,[]},
                   {exchange,
                       {resource,<<"/">>,exchange,<<"amq.fanout">>},
                       fanout,true,false,[]},
                   {exchange,
                       {resource,<<"/">>,exchange,<<"amq.headers">>},
                       headers,true,false,[]},
                   {exchange,
                       {resource,<<"/">>,exchange,<<"amq.match">>},
                       headers,true,false,[]},
                   {exchange,
                       {resource,<<"/">>,exchange,<<"amq.rabbitmq.log">>},
                       topic,true,false,[]},
                   {exchange,
                       {resource,<<"/">>,exchange,<<"amq.topic">>},
                       topic,true,false,[]}],
                  []]},
             {rabbit_exchange,recover,0},
             {rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
             {rabbit,run_boot_step,1},
             {rabbit,'-start/2-lc$^0/1-0-',1},
             {rabbit,start,2},
             {application_master,start_it_old,4}]}
{"init terminating in 
do_boot",{{nocatch,{error,{cannot_start_application,rabbit
,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}
}}},[{init,start_it,1},{init,start_em,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

c:\Temp\rabbitmq_server-0.0.0\sbin>

So there is an error when starting the exchange recovery module. Maybe a 
little bug?


>> We also have in mind two other possible approaches:
>>
>> - Build a web service between the Silverlight client and RabbitMQ. But we 
>> want to avoid polling as this would decrease the responsiveness. This is 
>> why we want to connect straight to RabbitMQ from the Silverlight client.
>
> You might also look at the Rabbit JSON RPC adapter, though this may suffer 
> from the same "textiness" that the STOMP adapter does.
>
Will JSON work well with binary data? The STOMP connection works well, so 
that's not the problem. It's just the use of binary data where it fails...


>> - Get the RabbitMQ client Project to compile against the Silverlight 
>> runtime. This is not undoable, but requires some work. Would someone be 
>> interested in a Silverlight version of the RabbitMQ client?
>
> A Silverlight client would be great to see!  How much work do you think 
> this involves, and what are the main obstacles -- are there classes that 
> substitute for those that are missing?
>
The only thing I did right now, was opening the .NET solution, update it 
(Visual Studio 2010) and add a Silverlight application. Then I edited the 
Silverlight .cproj file that was generated, to insert all the .cs files of 
the .NET client. When I try to compile the whole thing, I get about 40 
errors. I don't know yet how much work it's going to take, I'm analyzing the 
errors right now. The main obstacles are:
- Use of SLL in Silverlight (in our application we don't need this, but 
maybe it's possible to change some things?)
- Use of framing (needs to be resolved, but don't know how yet)
- Use of XmlDocument (may can changed by the use of XmlReader etc.)
- ArrayList's (can be changed in generic lists)

There are some classes that substitute for the classes that are missing, but 
I'm not sure in wich degree.

Jens Aernouts - Student Bachelor of Applied Engineering @ Artesis University 
College of Antwerp 




More information about the rabbitmq-discuss mailing list