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

Publish ServiceBus for Windows Server to Internet

$
0
0

Hello all,

I have deployed the Service Bus for Windows Server already in my server. Now i would like to publish it to use outside the network like Azure Service Bus does. 

Client can connect Service Bus by using SAS. Does anyone know how to do this? 

Please advise.

Thanks.


Logging service bus to database

$
0
0

Hello,

I'm fairly new to the service bus and I was wondering if I'm able to log the data from the service bus to a database.

I need the database to retreive the data from the database and display it on a site. 

I'm not sure what can and what not. The string that I'm sending to the Service bus is based on the AMQP protocol.


any way to retrieve skipped event using EventProcessorHost in azure event hub?

$
0
0

I'm using azure event hub's EventProcessorHost to process batch of events. For some reason I have to skipped events by not writing checkpoint when the threads count has reached the maximum, but I have to retrieve those skipped events after the threads count come down. Please see the implementation below:

async Task IEventProcessor.ProcessEventsAsync(PartitionContext context, IEnumerable<EventData> messages)
    {
        //Process Events
        foreach (var eventData in messages)
        {
            if (Process.GetCurrentProcess().Threads.Count <= 50)
                {
                    //do work
                    await context.CheckpointAsync(eventData);
                }
                else
                {
                    //do not write Checkpoint
                    break;
                }
        }
    }

This is a simple and straightforward logic but it's not working as what I expected. Once the "break" line hit the "foreach" breaks, I expect those skipped events will show up in the next "ProcessEventsAsync", but they never come again until the worker role recycle and re-register the "EventProcessorHost".

I have stuck in this issue for a few days please someone figure out what I've missed.

Many Thanks in advance!


How To get Policy Keys For Event Hub from Powershell

$
0
0

Hi,

I am creating a stream analytic job from powershell and for that i am using a json file which provide all the details to create the job.

While creating input which is of type stream and getting data from Event Hub we need to provide like following : --

"properties": {
        "ConsumerGroupName": "<ConsumerGroupName>",
            "EventHubName": "<EventHubName>",
            "ServiceBusNamespace": "<ServiceBusNamespace>",
            "SharedAccessPolicyKey": "<SharedAccessPolicyKey>",
            "SharedAccessPolicyName": "<SharedAccessPolicyName>"
      }

now my script is also creating the EventHub and SAS policies if its not created.

So if i run the script first time, its creates the event hub and keys and update the details on json file.

$Key = [Microsoft.ServiceBus.Messaging.SharedAccessAuthorizationRule]::GenerateRandomKey()
$Rights = [Microsoft.ServiceBus.Messaging.AccessRights]::Listen, [Microsoft.ServiceBus.Messaging.AccessRights]::Send, [Microsoft.ServiceBus.Messaging.AccessRights]::Manage
    $RightsColl = New-Object -TypeName System.Collections.Generic.List[Microsoft.ServiceBus.Messaging.AccessRights] (,[Microsoft.ServiceBus.Messaging.AccessRights[]]$Rights)
    $AccessRule = New-Object -TypeName  Microsoft.ServiceBus.Messaging.SharedAccessAuthorizationRule -ArgumentList "Manage", $Key, $RightsColl
    $EventHubDescription.Authorization.Add($AccessRule)

$NamespaceManager.CreateEventHub($EventHubDescription);

Write-Host "The [$Path] event hub in the [$Namespace] namespace has been successfully created."


(Get-Content $path ) | Foreach-Object {
$_  -replace '<SharedAccessPolicyKey>', $Key `
   -replace '<SharedAccessPolicyName>', 'Manage' `
} | Set-Content  $path

But i want my script to be reusable so in scenarios where the event hub already exists , i want to retrieve the already existed policy key and update json file accordingly.

Any idea on how to achieve this.

I am looking for a solution using powershell but any other way is also using.

CommunicationException on Service Bus queue

$
0
0

I have developed a webjob which sends messages to Dynamics Marketing by placing them on a service bus queue. I have multiple instances of the webjob running. When I place multiple messages on the service bus queue it works fine when the webjob is deployed in my personal Azure subscription. But when the webjob is executed in the customers azure subscription I receive the below described error message. Any idea how to solve this issue?

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Program.ProcessQueueMessage ---> NN.CIP.Common.SdkClient.QueuePeekException: Cannot connect to queues. See inner exception for details. ---> Microsoft.ServiceBus.Messaging.MessagingCommunicationException: Could not connect to net.tcp://[mynamespace].servicebus.windows.net:9354/. The connection attempt lasted for a time span of 00:00:00. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.ServiceModel.CommunicationException: Could not connect to net.tcp://[mynamespace].servicebus.windows.net:9354/. The connection attempt lasted for a time span of 00:00:00. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalBind(EndPoint localEP) at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) at System.ServiceModel.Channels.SocketConnectionInitiator.ConnectAsyncResult.StartConnect() --- End of inner exception stack trace --- 


Posting a message in a queue from SQL-database

$
0
0

I'm sure this has been asked before (but can't find it anywhere): How can I post a message into an Azure Service Bus queue from within a SQL-Server stored procedure (CLR)?

Thanks!

Leon

Automatic refresh on power BI not Working

$
0
0

 

I am  having issues with powerBI ,seems the automatic refresh its failing ,i   currently have to click refresh to see new data coming in ,i  have configure the the tumblingwindow part e.gtumblingwindow(second,3) are the any other settings/factors i have to set for the automatic refresh to work.(its a console app that selects data from database and sends each row to event hubs from event hubs to stream analytics then output is powerBi ) 

i am assuming the below code(e.g) could be the issue  since we are using  DynamicTableEntity which has limitation because its notserializable, so the part below becomes a bit off as its accepting a serializable entity but since we are still getting new data when we click refresh,then probably the are some factors we are missing when it comes to automatic refresh.

   var serializedobjects = JsonConvert.SerializeObject(jsonstring);
                        try
                         {
                         
                            //you send events to eventhub by creating EventData Instance (send via send methos )
                            EventData data = new EventData(Encoding.UTF8.GetBytes(serializedobjects))
                            {
                                //Using a partition key ensures that all the events with the same key are sent to the same partition in the Event Hub
                                PartitionKey = TransNumber.ToString()
                            };
                            // you can use Encoding.UTF8.GetBytes() to retrieve the byte array for a JSON-encoded string.
                            //send method that takes single EventData instance parameter and synchronously sends it to an Event Hub
                            eventHubClient.Send(new EventData(Encoding.UTF8.GetBytes(serializedobjects)));
                            eventHubClient.SendAsync(data);

What are ports 9350-9353 used for and are they needing to be opened outbound or inbound?

$
0
0

From @kenvlowe via Twitter

"Hello I am using the azure service bus and all the documents regarding ports say that I need ports 9350-9353 open can someone please tell me what these ports do or what they are for.

can you tell me what 9350-9353 are used for and are they needing to be opened outbound or inbound."

Over DM

Thanks,

@AzureSupport


Using Call Back on backend (401 - 40100 error received)

$
0
0

From @pLopezFr on Twitter who tweets:

“Is there any doc on how to use "Azure Callback" in the backend ? All I can get is 401-40100 Unauthorized Send”

When engaged the customer also added: “Hi. Here is my error message :401 - 40100: Unauthorized : Unauthorized access for 'Send' operation on endpoint 'sb”.

“I'm using Iiothubowner connexion string. iothubowner has all rights on the hub”

Tweet URL: https://twitter.com/plopezFr/status/695203299369312256 and DM
 
Thanks,
@AzureSupport

How to derive/access a shared secret for Windows Service Bus

$
0
0

A lot of documentation I'm finding is obviously for Azure and it all presupposes you have a shared secret rather than the way that WSB handles it for you via the STS.  Is it possible to derive the shared secret (maybe out of an OAuthToken?) for WSB? 

For instance, CloudFx requires the Issuer and IssuerSecret when constructing a ServiceBusEndpointInfo.  The ServiceBusExplorer sample (that came with the Windows Service Bus samples) also, when you actually run it, requires the Issuer and IssuerSecret. So when WSB is seamlessly handling all the security for me via the STS, how do i get (or derive) the shared secret that seems to be everywhere in Azure Service Bus?

Or am I getting this all hideously wrong and need to go read up some more on the STS?!  

thanks,

justin

what is the syntax in powerhsell for filtering on a subscription and a field in the message body for pub/sub

$
0
0

What I am looking for is how to do I say

if (subscription ="xyz")

  if (<mesagefield1 = "abc") then filter =abcxyz

So my subscription is xyz.

Then If the messagefield="abc" then set the filter for this subsctiption to abcxyz

event hub client for UWP

$
0
0

Hi

My UWP app wants to log events to event hub.  

How would I go about doing that?  Or do I have to stick with ApplicationInsight and dump the data to BlobStorage or SQL?

Thanks!

BrokeredMessage.CompleteAsync always gives ObjectDisposedException

$
0
0

message.CompleteAsync().ContinueWith(tr =>
                    {
                        if (tr.Exception != null)
                        {                       
                            Trace.TraceWarning("Failed to Complete BrokeredMessage \n" + tr.Exception.ToString());
                        }
                    });

--------------------------------------

Failed to Complete BrokeredMessage 
System.AggregateException: One or more errors occurred. ---> System.ObjectDisposedException: BrokeredMessage has been disposed.
   at Microsoft.ServiceBus.Messaging.BrokeredMessage.ThrowIfDisposed()
   at Microsoft.ServiceBus.Messaging.BrokeredMessage.EndComplete(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ObjectDisposedException: BrokeredMessage has been disposed.
   at Microsoft.ServiceBus.Messaging.BrokeredMessage.ThrowIfDisposed()
   at Microsoft.ServiceBus.Messaging.BrokeredMessage.EndComplete(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)<---

Delivering of BrokeredMessage - PeekLock

$
0
0

Hi,

I've got a question regarding the Lock in PeekLock-mode of ServiceBus BrokeredMessage:
I have several Tasks which try to receive BrokeredMessages. Can I be sure that a message is delivered only to one of the tasks? As far as I understand, the receive-operation will make a lock on the message, so no other task may receive this message. Is it 100% sure?

regards

TB

my external ip poinintg to us

$
0
0

hi all

The below mentioned are the Public IP Address of our VM’s / VNET/Blob storage etc.. all, these IP address are point to US region, but as  this all of our VM’s and blobs are created in North Europe region. <v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"> all my public ip's are pointing to us Indianapolis us can somebody tell my why it happens in azure <v:stroke joinstyle="miter"><v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
</v:path></v:stroke></v:shapetype>
.

Regards,

Vamsi Janga


Can you filter based on the content of the message

$
0
0

Hi,

I have some messages and when they are recieved they should go to subscriptions based on the Message content

1. First question is can messages be  filtered to subscriptions based on its content.

I have a topic and 2 subscriptions within that

I want to specify a filter which is based on the content ,so the message will go to the correct subscription based on the message content

For example, in my code I have

$SqlFilter = [Microsoft.ServiceBus.Messaging.SqlFilter]("(name = 'OriginBlikbx' AND origin='blikbox') OR (name = 'OriginBlikbxWrk' AND origin='blikbox-wrk')")

Is this legal syntax. I am just getting error messages that I dont really understand

[ERROR] + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBAuthorizationRuleCommand


An error occurred while retrieving Namespace MessagingSKU information

$
0
0
Hi,

Since this week we are hitting this error when connecting to queues.

The application has been running fine since 3 years and it's the first time we get this.

Is it related to a new kind of throttling?


The request has timed out after 60000 milliseconds.
The successful completion of the request cannot be determined.
Additional queries should be made to determine whether or not the operation has succeeded..
TrackingId:653d7325-bf51-4f5f-88b9-9310a299798c,TimeStamp:2/9/2016 11:46:49 AM 

Server stack trace: Exception rethrown at [0]: 
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
at Microsoft.ServiceBus.NamespaceManager.GetQueues() 
at CIW.Tools.AzureQueueObserver.QueueObserver.CheckQueues() in c:\svn\Tools\CIW.Tools.AzureQueueObserver\QueueObserver.cs:line 74 

The request was aborted: The request was canceled. 
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) 
at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAllAsyncResult.b__4f(GetAllAsyncResult thisPtr, IAsyncResult r) 
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 



-- Emmanuel Dreux <a href="http://www.cloudiway.com" title="IAM and migration solutions for the Cloud"> http://www.cloudiway.com</a>

Unreadable timestamp values

$
0
0

I'm collecting messages from azure service bus using a Logic App.

I'm seeing strange values in some the DateTime fields, e.g. EnqueuedTimeUtcvalues look like this: 5247588462813888675

It isn't a System.DateTime expressed in ticks; the MaxValue of a System.DateTime is 3155378975999999999.

Has someone seen this problem before?

This is my full property bag. This message came from Dynamics CRM, but I see the same problem when I inject a message using Service Bus Explorer.

{"http://schemas.microsoft.com/xrm/2011/Claims/Organization": "organisationon.crm6.dynamics.com","http://schemas.microsoft.com/xrm/2011/Claims/User": "","http://schemas.microsoft.com/xrm/2011/Claims/InitiatingUser": "","http://schemas.microsoft.com/xrm/2011/Claims/EntityLogicalName": "incident","http://schemas.microsoft.com/xrm/2011/Claims/RequestName": "Update","RuleName": "$Default","EventName": "IncidentChanged","MessageSource": "dxcrm-incidentcreated","CorrelationId": "{35ca6d32-e345-4692-aa1a-fafa65c4a657}","DeliveryCount": "1","EnqueuedSequenceNumber": "3","EnqueuedTimeUtc": "5247588462813888675","ExpiresAtUtc": "3155378975999999999","LockedUntilUtc": "5247588463817777224","LockToken": "cfa35891-9662-4a7a-a6ad-0be9383b4dc0","MessageId": "2ae22770dd134bfc9ae3bf15bd89f48f","ScheduledEnqueueTimeUtc": "0","SequenceNumber": "11000023","Size": "5832","State": "Active","TimeToLive": "9223372036854775807"
}


What´s the best way to connect a siemens PLC to IoT hub?

$
0
0

From @UlissesOPaiva via Twitter

"@AzureSupport What´s the best way to connect a siemens PLC to IoT hub? Have I implement AMQP on PLC or I can use OPC UA?"

http://twitter.com/UlissesOPaiva/status/694927861409570816

Thanks,

@AzureSupport

Azure IoT Hub Python SDK

$
0
0

Hello

Are there plans for a Python SDK for Azure IoT Hub?

Dieter

Viewing all 1916 articles
Browse latest View live


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