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

Upgrading a service to 1.8 causes MessageBufferClient not found error

$
0
0

We have an old Windows Service.  We have discovered a bug which I would like to fix and deploy.

However, since this was last worked on we are now using Visual Studio 2015 and the Azure Framework is 1.8 (think it might have been 1.4 before and Visual Studio 2013 maybe even 2010).

I have upgraded the solution and replaced many of the DLLs using Nuget.  We have integrations with CRM for example.  The project is .NET 4.0 which seems the most compatible for the moment.

My error is "The type or namespace MessageBufferClient could not be found".

From a little reading it sounds like MessageBufferClient is no longer supported.

Can someone steer me on what to do here?

I am not massively familiar with Queues and it is a legacy system so am looking to solve this fairly safely and easily.  A code sample of one of the functions is shown below:

public static MessageBufferClient GetMessageBufferClient()
        {
            String serviceNamespace = RoleEnvironment.GetConfigurationSettingValue("ServiceNamespace");
            String servicePath = RoleEnvironment.GetConfigurationSettingValue("ServicePath");
            String issuerName = RoleEnvironment.GetConfigurationSettingValue("IssuerName");
            String issuerSecret = RoleEnvironment.GetConfigurationSettingValue("IssuerKey");

            // Create the policy for the message buffer.
            MessageBufferPolicy policy = new MessageBufferPolicy();
            policy.Authorization = AuthorizationPolicy.Required;
            policy.MaxMessageCount = 10;
            // Messages in the message buffer expire after 5 minutes.
            policy.ExpiresAfter = TimeSpan.FromMinutes(5);
            policy.OverflowPolicy = OverflowPolicy.RejectIncomingMessage;

            // Create the credentials object for the endpoint.
            TransportClientEndpointBehavior credential = new TransportClientEndpointBehavior();
            credential.CredentialType = TransportClientCredentialType.SharedSecret;
            credential.Credentials.SharedSecret.IssuerName = issuerName;
            credential.Credentials.SharedSecret.IssuerSecret = issuerSecret;

            // Create the URI for the message buffer.
            Uri uri = ServiceBusEnvironment.CreateServiceUri(Uri.UriSchemeHttps, serviceNamespace, servicePath);

            return AzureHelper.GetOrCreateQueue(credential, uri, ref policy);
        }
Any help is greatly appreciated.


Viewing all articles
Browse latest Browse all 1916

Trending Articles



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