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

Service Bus IP Address Ranges in East US


401 error is shown if CreateOAuthTokenProvider or CreateWindowsTokenProvider was called with password ends with ++

$
0
0

Hi, 

we noticed a very strange problem in Service Bus 1.1 for Windows.

If token provider is created with specific NetworkCredential, and password ends with ++, like "MyPassword123++", then error is returned in subsequent use of the provider:

The token provider was unable to provide a security token while accessing 'https://<my server>:9355/<myns>/$STS/OAuth/'. Token provider returned message: '<Error><Code>401</Code><Detail>The user name or password is incorrect...

The error is the same for TokenProvider.CreateOAuthTokenProvider and TokenProvider.CreateWindowsTokenProvider (only endpoint address changes).

User could successfully login into computer using "MyPassword123++".

If I change user's password to something else, like "MyPassword123", it works fine. 

Is it a know issue? What can be the reason?

Thanks

PS. It looks like any password with + does not work. TokenProvider uses space instead.

 


How to have a queue as a subscriber to a topic

$
0
0

I have a service which publishes messages to a Topic.

I have one or more services which subscribe to said topic, however I need resilience in one or two of those services, and therefore want to register a Queue as a subscriber to said Topic, so that when a service is taken down (for whatever reason) any messages which it would have been expected to process will be queued and waiting for the service to resume normal duties.

How therefore can I register a Queue as a subscriber to a Topic

Many thanks

Question about Event Hub

$
0
0

hi,

   Background: The purpose for the app is to find out ServiceBus event hub's max capacity for reading/writing messages.

   environment: 2 senders which sending batch of data per 10 seconds to the event hub, while 2 receivers are receiving messages from the event hub, then either insert into table storage/ blob storage. (also the reading/writing capacity to storage will be found out.)

   each sender: current environment settings: total devices =500, total tags=50000, sample rate=10 seconds

it means 500 commit per 10 seconds, each commit contains 100 columns which is 17482 bytes in total.

however, after almost 3 mins, the log shows below ServerBusyException.

My question is what the root cause for the throttled.

Here is the log

[2016-05-04 02:41:55,751]  1 -- INFO  -- LogInfo [WriteLog] -- step 2: Launch agent instances to submit data.........

 ...............................

[2016-05-04 02:44:11,151]  3 -- ERROR -- LogError [WriteLog] -- Submit data failed.
Microsoft.ServiceBus.Messaging.ServerBusyException: The request was terminated because the entity is being throttled. Error code : 50002. Please wait 4 seconds and try again. TrackingId:a30dd90a000066430007ba7457296147_G18_B5, Reference:b315d19a-405a-49d9-b118-f72e820b8e2e, Timestamp:5/4/2016 2:44:09 AM
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.ServiceBus.Messaging.MessageSender.EndSendEventData(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

Here is the C# code

EventHubClient client = EventHubClient.CreateFromConnectionString(
                                ServiceBusSettings.ServiceBusConnectionString,
                                ServiceBusSettings.DefaultTagvalueEventHubName);
            string dataStr = string.Empty;
                try
                {
                    client.RetryPolicy = RetryPolicy.Default;
                    dataStr = JsonConvert.SerializeObject(data);
                    //LogHelper.WriteLog(string.Format("each message = {0} bytes", dataStr.Length));
                    var dataInByte = Encoding.UTF8.GetBytes(dataStr);

                         var eventData = new EventData(dataInByte) { PartitionKey = data.CollectionGroupKey };
                        await client.SendAsync(eventData);
                        await client.CloseAsync();
                        tagsCount.AddCount(data.Samples.Sum(s => s.TagValues.Count()));
                        LogHelper.WriteLog(string.Format("Submitted total {0} tags.", tagsCount.TagsCount));
                }
                catch (Exception ex)
                {
                    if (!client.IsClosed)
                    {
                        client.Abort();
                    }

                    LogHelper.WriteLog(string.Format("Submit data failed. current data size ={0} bytes.", dataStr.Length), ex);
                }

Receive Messages from Azure Service Bus using Powershell

$
0
0
How to receive messages from Windows Azure Service Bus using Powershell?

SharePoint Architect

AMQP problems when using Qpid JMS with Service Bus

$
0
0
Hi,

There are some serious problems when using Qpid JMS client with Service Bus (both Azure and on premise). For example:

1. When there is nothing on the queue and the client sends a Flow frame with "drain=true", Service Bus doesn't answer anything. That blocks the client and causes a timeout error later.
2. When prefetching messages without consuming them, Service Bus locks them for the "Lock Duration" interval. When closing the consumer, the client sends Detach and then explicitly releases all unconsumed messages. However, Service Bus seems to ignore the Disposition frames sent after Detach and therefore all those messages stay locked.

Can someone from Microsoft comment on these issues? Are there any workarounds?

Thanks!

Azure Notification Hub .Net SDK Methods are not working

$
0
0
I started using Azure Notification Hub to send PUSH to Android and iOS devices. To send PUSH i am using .net SDK. I created a REST API to allow device to register on Azure Notificaion Hub and internally this REST API is calling .net SDK methods. But when I call these .net SDK methods inside of REST API its don't return any response and if I call same method through some windows/Console .ent application all are working fine. The methods names are mention below.

_NotificationHubClient.GetRegistrationAsync<RegistrationDescription>(registrationId);

_NotificationHubClient.SendTemplateNotificationAsync(param); ;

Installation ins = _NotificationHubClient.GetInstallation(registrationId);

All get and send methods are having same problem. Only  _NotificationHubClient.CreateOrUpdateInstallation(newInstallation) is working fine.

level of encryption you do with messages you send to Service Bus

$
0
0

From Ross McWattie @rossmcwattie via Twitter

Hi Can you tell me what level of encryption you do with messages you send to Service Bus and also messages that you consume using MessageReceiver?

We're reviewing your query and will provide a follow up soon. Stay tuned! ^AL

Thanks

@AzureSupport


Azure Service Bus Topic not working as FIFO

$
0
0

I'm developing two WebJobs for azure: One which will be putting messages in the Service Bus Queue using a topic and another which is subscribed to the ServiceBusTrigger using the same topic.

The messages are sent to the service bus queue correctly but when run the WebJob subscribed to the ServiceBusTrigger those messages are not being processed in FIFO basis.

The code for the WebJob which puts messages in the service bus queue is the following:

NamespaceManager namespaceManager = NamespaceManager.Create();

// Delete if exists
if (namespaceManager.TopicExists("SampleTopic"))
{
    namespaceManager.DeleteTopic("SampleTopic");
}

TopicDescription td = new TopicDescription("SampleTopic");
td.SupportOrdering = true;
TopicDescription myTopic = namespaceManager.CreateTopic(td);

SubscriptionDescription myAuditSubscription = namespaceManager.CreateSubscription(myTopic.Path, "ImporterSubscription");

TopicClient topicClient = TopicClient.Create("SampleTopic");
for(int i = 1; i <= 10; i++)
{
    var message = new BrokeredMessage("message"+i);
    topicClient.Send(message);
}
topicClient.Close();

The WebJob which is subscribed to the service bus trigger has the following code:

namespace HO.Importer.Azure.WebJob.TGZProcessor
{
    public class Program
    {
        static void Main(string[] args)
        {
            JobHostConfiguration config = new JobHostConfiguration();
            config.UseServiceBus();
            JobHost host = new JobHost(config);
            host.RunAndBlock();
        }

        public static void WriteLog([ServiceBusTrigger("SampleTopic", "ImporterSubscription")] string message,
            TextWriter logger)
        {
            Console.WriteLine(message));
        }
    }
}

How can I achieve to process the messages from the queue as FIFO?

Thanks in advance!


Azure - Adding Service Bus problem

$
0
0
I can not add the Service Bus via azure portal (https://portal.azure.com). When I go to Create, it redirects me to "No subscriptions found" page. I have a Pay-As-You-Go active subscription. Same thing happens whan I try to login to old portal (https://manage.windowsazure.com/) right away. What can I do to solve this problem?

SubscriptionClient.AcceptMessageSession Failed with Timeout exception

$
0
0

I created a Azure Topic and a subscription with Session-Enabled to be true.  I can send a message to the topic with a non empty SessionId.  But When I tied to read the message with the following code, it throws the timeout execption at subClient.AcceptMessageSession. Did I do anything wrong?  The similar code (with QueueClient) works fine for a direct session enabled Azure Queue.

                    SubscriptionDescription subscriptionDescription = namespaceManager.GetSubscription(Topic_Name, Subscription_Name);
                    SubscriptionClient subClient = SubscriptionClient.CreateFromConnectionString(connectionString, Topic_Name, Subscription_Name);

                    if (subscriptionDescription.RequiresSession)
                    {
                        MessageSession msgSession = subClient.AcceptMessageSession(TimeSpan.FromSeconds(120));
                        if (msgSession != null)
                        {
                            message = msgSession.Receive(TimeSpan.FromSeconds(5));
                        }
                    }


Event Hub performance?

$
0
0

Hello,

I'm sending a few thousand messages to Event Hub using the SendAsync function.

They show up in the management dashboard (https://manage.windowsazure.com -> Event Hub) not sooner than several *hours* after sending, so I'm worried there may be a performance issue.

Is this the case? Or am I missing something?

Thanks!

Paolo

Service Bus Queue is not available now !

$
0
0

The Service Bus Queue which had been running without any error, occurs the following error.

--------------------------------------
An unhandled exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.ServiceBus.dll

Additional information: The remote server returned an error: (401) does not allow claim is empty TrackingId:. F1ae8661-2b46-433e-9621-c7b91c5927e3_G7, SystemTracker: digipub.servicebus.windows.net: DigipubOrder_Session, Timestamp: 7/20/2016 2:18:55 AM
 --------------------------------------

By debugging, I found that the error ocurrs at "namespaceManager.QueueExists (queueName)" in the following C# source.  I checked again this "ConnectionString" by the Azure management portal.  It was the same string.


- Is there an expiration date of ConnectionString?

- In that case, how can we update it?

- Or is there any possibility of adverse effect of the current Service Bus Queue version-up? In that case, please tell us how can we solute the problem.

- In such a case as  "destructive" version-up giving a direct impact on the running program,  where will the pre-announcement be done?

Any help and hint is most welcome.
Thank you in advance.
 

--------------------------------------
(C# source for PowerShell library)

        public QueueClient InitializeParamWithSession(string connectionString, string queueName, bool useSession, bool? deleteAfterReceipt)
         {
             QueueDescription queueDescription = new QueueDescription(queueName)
             {
                 RequiresSession = useSession
             };

            var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);

            if (!namespaceManager.QueueExists(queueName))
             {
                 namespaceManager.CreateQueue(queueDescription);
             }
             var GQueueClient = CreateQueueClient(connectionString, queueName, deleteAfterReceipt);
             return GQueueClient;
         }

        public QueueClient CreateQueueClient(string connectionString,string queueName, bool? deleteAfterReceipt)
         {
             ReceiveMode receiveMode;
             if (deleteAfterReceipt != null)
             {
                 if (deleteAfterReceipt == true)
                 {
                     receiveMode = ReceiveMode.ReceiveAndDelete;
                 }
                 else
                 {
                     receiveMode = ReceiveMode.PeekLock;
                 }
                 return MessagingFactory.CreateFromConnectionString(connectionString).CreateQueueClient(queueName, receiveMode);

            }
             else
             {
                 return MessagingFactory.CreateFromConnectionString(connectionString).CreateQueueClient(queueName);

            }
         }
 --------------------------------------


Error in Azure Service Bus Topics - Unauthorized InvalidSignature The token has an invalid signature

$
0
0

I am trying to Create a Topic with C# but it throws an error.

If I use the "RootManageSharedAccessKey" it works fine but when I try to use the Topic Policy, it does not work.

My Policy is named "Manager" and I it has "Manage, Send, Listen" permissions.

Unauthorized. InvalidSignature: The token has an invalid signature. 

Thanks & Regards,

Jerry.

Service bus with new azure portal

$
0
0

Hi expert,

I just read this announcement

https://azure.microsoft.com/en-us/blog/service-bus-and-the-new-azure-portal/.

I would like confirmation as i'm not sure to understand if i need to do something or not.

Context:

I have already EventHub (and only event hub - no queues to tables) and a namespace.

Question 1:Does it mean that i MUST do something in august 2016 ?

Question 2: Does in mean that i MUST do something in November 2016 ?

Question 3: Does in mean that i MUST do something in March 2017 ?

Say another can i let my existing Event as they are ?

In case i need to do something (move EventHub to a new namespace): 

Question 4: could you confirm that Azure will let move move via Azure Portal ? 

Question 5: could you confirm that Azure will let move move via Powershell ?  Which cmdlt is it ? Shall we install new Azure Powershell version ? Does this version already exist ?

Thanks for your feedback.


ServiceBus Namespaces restructure - Changes to .Net client & REST API

$
0
0

This is with reference to the new announcement https://azure.microsoft.com/en-gb/blog/service-bus-and-the-new-azure-portal/

I would like to know if there will be any modification to .Net clients and REST APIs to align with this restructure.

Event Hub resource in ARM template

$
0
0

I have an event hub in my arm template, looks like this:

{"apiVersion": "[variables('serviceBusApiVersion')]","name": "[variables('serviceBusNamespaceName')]","type": "Microsoft.ServiceBus/Namespaces","location": "[resourceGroup().location]","kind": "EventHub","sku": {"name": "StandardSku","tier": "Standard"
      },"resources": [
        {"apiVersion": "[variables('serviceBusApiVersion')]","name": "[variables('serviceBusEventHubName')]","type": "EventHubs","dependsOn": ["[concat('Microsoft.ServiceBus/namespaces/', variables('serviceBusNamespaceName'))]"
          ],"properties": {"path": "[variables('serviceBusEventHubName')]","partitionCount": "[parameters('eventHubPartitionCount')]"
          },

Now when I deploy, the portal tells me "Azure Event Hubs come under the same Azure Messaging umbrella like Service Bus Messaging and Azure Relay and to take advantage of the unique messaging platform each of the service architecturally offers, we are separating our services and with that Azure Event Hubs under the Microsoft.EventHub provider will have EventHub namespace type. This means that you cannot create an EventHub under the Messaging namespace type."

As you can see from my template, I am not using the Messaging or Microsoft.EventHub namespace type. Do I just need to change the type to Microsoft.EventHub, and remove the "kind" element? Do I no longer need the event hub as a child resource of the service bus? Do consumer groups work the same way?

Thanks

Where to find the ConnectionString in the new service bus portal?

$
0
0

With the new service bus portal that was released recently, where can I find the Connection Information link so that I can get the ConnectionString for the service bus namespace?

Thanks!

Does Azure Event Hub Support AMQP Using Golang?

$
0
0

Hello Team!

An Azure customer @KyosukeTomoda via Twitter is asking the following question:

Is it easy to consume messages from Azure EventHub with AMQP using Golang? There seems to be no documentation.  

We would appreciate your insight into this inquiry. Thank you!

@AzureSupport

How to delete Notification Hub?

$
0
0
I have a notification hub setup a while ago. I am not using it but I can't find out in the portal where it is display. Definitely not in my Service Bus panel. Azure is billing me everyday!!!

Frank

Viewing all 1916 articles
Browse latest View live


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