This project is read-only.

AMQP connection creation issue

Feb 12, 2015 at 11:47 AM
Edited Feb 12, 2015 at 11:48 AM
I downloaded amqpnetlite 0.1.1 beta version code and running on VS-2013.
i got issue when creating socket connection.

Address address = new Address("amqps://"); Please let me know how i will configure parameter of address constructor. Please expalin me in detail i am not having any idea about password prperty of address.

Please also let me know one more thing is it possible to run with VS2013, any hardware is required or not?
Feb 12, 2015 at 11:52 AM

what's the issue ?

Feb 12, 2015 at 12:20 PM
Hi Paolo,
Thanks for quick reply.

I want to implement Azure service bus(Event HUB,Topic, Subscription) in .Net microFramework with VS-2013 please provide me any sample example.

Feb 12, 2015 at 1:32 PM
You can fine more examples in the documentation section :

You can compile them on .Net Micro Framework too.
Remember that you need a board with SSL support (for example, FEZ Spider and FEZ Raptor from GHI ... Netduino doesn't support it)

Feb 13, 2015 at 4:59 AM
Hi Paolo,

I have developed a .net microframework Project that send messages to azure service bus topics and subscription using RESTAPI. But now I want to implement subscrtiptionClient onMessage (like message pump in .net azure service bus sdk ).My scenario is if any one send message to subscription so my machine will receive a notification that some one send message to service bus subscription.
I am using visual studio 2013 .net microframework console application

Feb 13, 2015 at 7:24 AM

Please let me know how i will create Address object using given example end point.


Address address = new Address("amqps://<user>:<key>@<namespace_base_uri>");
My created Address object is given below but it's not working.

Address address = new Address("amqps://MyTestSendKey:5/B4HoMxh4CLDjAEPF8T0r3dKJouJ/");

Please create a proper Address object from given end point and let me know how i will create encoded key.

Feb 13, 2015 at 6:08 PM
The key name and key need to be URL encoded as follows:
Address address = new Address("amqps://");

Or you can create the Address object by specifying individual parameters:
Address address = new Address("", 5671, "MyTestSendKey", "5/B4HoMxh4CLDjAEPF8T0r3dKJouJ/9Q+TUEBZrw9Qz=", "amqps");

In the first case, the URL encoding is needed because there might be reserved characters ('/', '@') in your key name or value and that could break the URL parsing. This constructor is intended to make config easier (e.g. you could store the connection string as just one string item).

Feb 16, 2015 at 5:04 AM
Edited Feb 16, 2015 at 12:35 PM
Hi Xin,
Thanks for your reply...

I am using below code(without any device running project in VS Micro framework) for sending data to azure its working fine but when i go to Azure portal unable to see any record. Please correct me if something is wrong.
        Address address = new Address("", 5671, "MyTestSendKey", "5/B4HoMxh4CLDjAEPF8T0r3dKJouJ/9Q+TUEBZrw9Qz=", "amqps"); 
        Connection amqpConnection = new Connection(add);

        var amqpSession = new Session(amqpConnection);

        SenderLink amqpSender = new SenderLink(amqpSession,
               "send-link/in/t0000", // unique name for all links from this client 
               "/in/t0000"); // Service Bus entity name 

        var message = new Message();
        message.Properties = new Properties();
        message.Properties.Subject = "mymessagetype";
        message.ApplicationProperties = new ApplicationProperties();
        message.ApplicationProperties["MyProperty"] = "Hello World!";
Please explain 2nd and 3rd parameter of SenderLink. What is send-Link,in and t000?
                SenderLink amqpSender = new SenderLink(amqpSession,
               "send-link/in/t0000", // unique name for all links from this client 
               "/in/t0000"); // Service Bus entity name     
  • I am not having any SSL supported device please let me know is it possible to run this code without SSL support device?
Feb 17, 2015 at 8:31 AM

the 2nd parameter ("send-link/in/t0000") is simply an identifier name for the link and the 3rd ("/in/t0000") is the entity that already exists in the service bus namespace. It could be a queue, a topic or an event hub (for a sender).
What do you mean that you can't see any record in the portal ? Does the "/in/t0000" entity exist in your service bus namespace ?
To see messages send and/or receive to/from entities in service bus you can use the Service Bus Expolorer here :

The connection to Service Bus is only possible using SSL.