Quantcast
Channel: Service Bus forum
Viewing all 1916 articles
Browse latest View live

IoT architecture question

$
0
0

Hi,

I have a question related to an IoT architecture I'm putting in place. I would like using Service Bus to process sensor data (coming from sensors connected to edge-devices) in Azure Cloud and to command actuators (connected to edge devices). For the latter I will use webpages and smartphone apps.

My question:

- should i from a webpage/smartphone app send the messages Service Bus (e.g. a topic)directly (e.g. from JavaScript in the browser)

or

- should I from a webpage/smartphone app call an ASP.NET REST service (Web API) and this REST service (Web API) sends the messages to Service Bus (e.g. a topic)?

Thanks

Guy


access odata web-api from client application using service bus authentication?

$
0
0

I am developing an odata we-bapi which will be hosted in cloud and i need to access the web-api url in client application like console,excel,web etc with authentication, so i created service bus for securing the web-api like configuring the SAS key token on both client and web-api but i dont know how to configure service with web-api? :(

we referred in net but all the article using WCF, data contract and service contract etc. but in my case i am using only asp.net web-api with odata and entity framework for database tables as model.Need help on configuring service bus in web-api


Saravanan

Is it possible to cancel a message that is schedule to be delivered ?

$
0
0

Hi,

I want to use the service bus message schedule delivery in the following scenario:

  • I have a Purchase Order that is processed by a BizTalk Server process. It is first received from a Service bus queue by BizTalk;
  • During the PO process in BizTalk, we can have errors that need to reprocess the PO later. Depending on the error, we need to wait for a specific time to reprocess the PO
  • Our choice is to publish the PO to be reprocessed in a service bus queue with a schedule delivery. For example, in 1 day we want to reprocess the PO, so we will set a ScheduledEnqueueTimeUTC to the date/time we want

But we also want to:

  • Cancel the publication of the message: if the message is not delivered yet to the queue, we want to offer the ability to cancel its publication, is it possible?
  • Change the Scheduled enqueue time to postpone it or move it forward. Is it possible?

Thanks.

Windows Server Service Bus 1.1 sometime freezes

$
0
0

I have benchmark which make async sends and async receives.

First, I send 500000 short messages to queue. To not overload service bus with too many concurrent async requests I limit concurrent request number with help of Semaphore class (sender waits for semaphore before SendAsync and releases semaphore after SendAsync completes). After every 1000th SendAsync task completes I log (to memory) sent message count and time elapsed after 1st SendAsync started. When I set semaphore's initialCount and maximumCount to 1500 then sender freezes (for 3-4 seconds) every 100000 messages.

After all messages sent I start receiver. It has semaphore with 1000,1000 and prefetchCount=500. Receiver works in PeekAndLock mode. I call ReceiveAsync and after task completes I call CompleteAsync. After every 1000th CompleteAsync task completes I log (to memory) completed message count and time elapsed after 1st ReceiveAsync started. Receiver also freezes (3-4 sec) every 100000 messages.

Service Bus on an Azure VM

$
0
0

Hi,

I have created a new VM in Azure (Server 2012 with SQL 2014). On that VM I have installed SB for Windows 1.1 Server. I can connect to it from the local machine but not from outside of the VM (i.e. from my Dev box).

I was wondering. Is there something specific I have to do to enable a remote client to connect to the SB namespaces? I haven't done anything special at the moment apart from install and configure SB, then created a namespace using PowerShell.

I am using the following connection string:

Endpoint=sb://mynamespace.myserver.cloudapp.net/;StsEndpoint=https://myserver.cloudapp.net/;

SharedSecretIssuer=myuser;SharedSecretValue=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Can anyone help me?

Graham


Unable to upload APNS Certificate in Notification Hub configuration

$
0
0

After generating a .p12 file from my keychain (following the recommended steps here: ), I upload it to the notification hub configuration and get the following error message:

SubCode=40000. Failed to validate credentials with APNS. Error is A call to SSPI failed, see inner exception...TrackingId:4d464cd9-06e7-84af-a3b3-193de4fd619c_M0_G25,TimeStamp:3/25/2014 9:16:28 PM

The odd thing is that I successfully uploaded this certificate last week and had my apple push notifications working! Then as I tried to configure the google notifications in the azure portal, it started complaining about the Apple cert (even though it hadn't changed!)

So two questions:

1) Any ideas what is going on here? 

2) Any pointers on where to look up the inner exception details?


Timeout Exception in Windows Azure Service Bus Relay

$
0
0

When creating the WCF binding with the Azure service bus I get the connection timeout exception when try to open the ServiceHost.

Below is my code

 var sh = new ServiceHost(typeof(ProblemSolver));


sh.AddServiceEndpoint(typeof(IProblemSolver), new NetTcpRelayBinding(),
                ServiceBusEnvironment.CreateServiceUri("sb","myservicebusnamespace", "problemsolver")).
                Behaviors.Add(new TransportClientEndpointBehavior
                {
                    TokenProvider = TokenProvider.CreateSharedSecretTokenProvider("owner", "mykey")
                });

            sh.Open();

            Console.WriteLine("Press ENTER to close");
            Console.ReadLine();

            sh.Close();


My blog : http://thuruinhttp.wordpress.com

CORS issue in Service Bus Topic/Subscriptions

$
0
0
I am trying to connect Azure Service Bus in JavaScript, mainly Topic and Subscription, the CORS issue occurs. So, is there any public API allow me to set the Service Bus allowed origin just like Storage do?

Service Bus authentication

$
0
0

Hi

I am struggling a bit on security of Service Bus for Windows Server 1.1.

My configuration needs to be: Service Bus installed on a VM in a data centre, with no Active Directory or Domain.

Clients connecting to the SB from multiple machines.

Clients will want to subscribe to a Topic, and write to a different Queue.

I was thinking that I need to use SAS authentication. Is this right?

If I use SAS do I need to export the Certificate from the SB machine and import it in to EACH client?

Is there a security mechanism available where by I can use some sort of username / password or shared secret to enable the clients to connect to the SB.

The Clients will not need to create an queue's, just read from or write to existing queues.

Thanks for your help

Graham

WIndow Azure Service Bus Event Hub Receiving Data

$
0
0

Currently, the Service Bus Event Hub support HTTP and AMQP protocols, for receiving data, we only can use the AMQP protocol? 

I have downloaded a sample from CodeSamples, run it, got an exception: can not connect remote server, is it caused by using the HTTP protocol?

Cannot get Ruby to work with Service Bus

$
0
0

We have been trying for days to get a simple ruby application to work with the Azure service bus. Below is the code we are using.  Has anybody gotten this to work?  We have tried every variation on the namespace and access keys..  Help!!

require "azure"

  Azure.config.sb_namespace = "XXXXX.servicebus.windows.net"
  Azure.config.sb_access_key = "??????????????????????????????????"
  a = Azure::ServiceBus::ServiceBusService.new
begin
  queue = a.create_queue("test-queue")
rescue
  puts $!
end

The error returned is "getaddrinfo: No such host is known. "

How to manage the SAS information in .NET client library

$
0
0

I want to manage SAS info in .NET client library, including add a new rule to the topic, modify the exist rule, or even delete. Is this possible?

From my practice, I can only add a new rule before the very first time I create the topic.

NamespaceManager nm = NamespaceManager.CreateFromConnectionString(nsConnectionString);
contosoTListenRule = new SharedAccessAuthorizationRule("contosoTListenKey2",
    SharedAccessAuthorizationRule.GenerateRandomKey(),
    new[] { AccessRights.Listen });
TopicDescription td = new TopicDescription(topicPath);
td.Authorization.Add(contosoTListenRule);


nm.CreateTopic(td);

Thanks.

Sending large messages

$
0
0

Hi,

Can anyone point me in the direction of patterns of handling sending potentially large messages over Service Bus 1.1 please?

I am using Service Bus to sent data down to some Windows Clients where this data can be quite large. I could zip the data and spread over multiple messages, or I could obtain the data from a different source / API once I receive the message through SB.

Thanks for your help.

Graham

Scheduled message delivery and duplicate message detection

$
0
0

Hi,

I want to know how Service Bus 1.1 for Windows Server deal with the following situation:

  • I want to detect duplicate messages on a queue, so I set the option on the queue
  • I first send a message to the queue with a ScheduledEnqueueTimeUtc: the message will appear in the queue in a couple of minutes after
  • Before this message is enqueued, I send a message with the same id to the same queue.
  • Which message will be detected as the duplicate? The first one or the one that is scheduled? I hope this will be the one scheduled.

Thanks.

Connection Azure service bus via Java client


Event Hubs AMQP connectivity for Java

$
0
0

I'm trying to use AMQP/JMS from Java to an Event Hub but there are no actual examples or docs on how to properly do so. I managed to get it working somewhat by subscribing to a topic of "{eventHubName}/ConsumerGroups/$Default/Partitions/{partitionid}" but the problems is 1) how do we connect to custom consumer groups, 2) how do we specify the starting offset, 3) what type of subscriber should we be using (durable, consumer, etc.), 4) what message acknowledgement mode should we use? I also only start receiving a first batch of messages and then nothing.

Please if you could provide some assistance and examples I'd really appreciate it!!!

Service Bus template not available in Visual Studio

$
0
0

Hi, I have a fresh new setup of Azure SDK and azure Biztalk services(latest versions). I understand that following this we should have a service bus template project inside Visual studio which is not the case.

I think that the setup is ok as when I connect through azure in server explorer, I can connect to all services in azure.

Is there any step or configuration that needs to be done in order to have this template appear in VS?

Thanks in advance

Frequent FaultExceptions?

$
0
0

Can someone provide a bit more insight about what exactly causes Azure Service Bus to return FaultExceptions?

These have started happening pretty frequently for us (every few minutes) and I'm struggling to figure out why.  Due to the lack of detail in the messaging, it's completely unclear if (a) our code is doing something incorrectly to provoke this, (b) Service Bus is just unreliable, or (c) something else entirely.  They're happening frequently enough that it's worrisome to me and I'd really like to pin down the root cause so that we can attempt to prevent this from happening.

As a frame of reference, for the period from 10AM to 11AM yesterday, the management portal lists 16,756 "Total Requests" and 2,849 "Total Messages" (not really sure what exactly those numbers mean).  That equates to 4.5 requests/sec and less than 1 message/sec.  Given that's an hourly average, I'm sure that there are spikes higher than that, but given the guidance I've read, those numbers look _well_ below the threshold of what the Service Bus is supposed to be able to handle without even breaking a sweat.

Note that we're using the V2.3.0.0 of the SDK, which I believe by default uses an internal IRetryPolicy to retry failed requests, so I'm guessing that there are actually more errors than this and the only exceptions bubbling up are from the retry policy failing.  Here is the (utterly unhelpful) text of the exceptions (note that the lowest frame on the stack varies -- sometime's it's SetState, sometimes it's Send, sometimes its AcceptMessageSession, etc).

Microsoft.ServiceBus.Messaging.MessagingException: The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id..TrackingId:c9e3a56f-6b48-4153-8e4d-dbecb04c7d14_G26_B3,TimeStamp:9/12/2014 5:52:47 PM ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id..TrackingId:c9e3a56f-6b48-4153-8e4d-dbecb04c7d14_G26_B3,TimeStamp:9/12/2014 5:52:47 PM

Server stack trace:
   at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.ThrowIfFaultMessage(MessagewcfMessage)
   at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.HandleMessageReceived(IAsyncResultresult)

Exception rethrown at [0]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResultthisPtr, IAsyncResultr)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResultresult)

Exception rethrown at [1]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResultthisPtr, IAsyncResultr)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResultresult)

Exception rethrown at [2]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResultthisPtr, IAsyncResultr)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResultresult)

Exception rethrown at [3]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Sbmp.SbmpTransactionalAsyncResult`1.<GetAsyncSteps>b__3b(TIteratorAsyncResultthisPtr, IAsyncResulta)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResultresult)

Exception rethrown at [4]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSession.OnEndSetState(IAsyncResultresult)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResultresult)
   --- End of inner exception stack trace ---

Server stack trace:


Exception rethrown at [0]:
   at Microsoft.ServiceBus.Messaging.MessageSession.SetState(Streamstream)


Difference between QueueClient.OnMessage and QueieClient.Receive()

$
0
0

Hi,

I was wondering is there was any difference in using Receive and OnMessage() on the queue client class. I know OnMessage takes the delegate to call when a message appears on the queue but is that the only major difference.

Maybe I should be more specific. I am using OnMessage. In my Action expression, I pass the BrokeredMessage reference to a different thread for processing. The Action expression then finishes, ready to receive the next message from the queue. However, when the new thread then tries to access the passed in BrokeredMessage it throws an exception because the BrokeredMessage has been Disposed.

I want to take the BrokeredMessage off the queue (PeekLock), pass it on to another thread for processing, then get the next message, forgetting about the first. The threads that process the message would the call Complete or Abandon on the message.

Thanks for your help

Graham

Who sent message on Azure Service Bus

$
0
0
Is there a way to tell who is sending messages to an Azure Service Bus Topic?  We are receiving a null message each day at the same time and we would like to try and figure out who is sending it? Cheers Stew
Viewing all 1916 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>