I have gone through Jaeger Documentation. They have specified that how will Jaeger will work the HTTP request kind of scenario but if I want to get traces of Nservicebus's to publish/subscribe method then How will I get using Jaeger?
Is it possible? Or Jaeger only works with HTTP requests?
Not out of the box, you have to plug a behaviour into NSB that uses open telemetry
https://github.com/open-telemetry/opentelemetry-dotnet
You will have to write custom code.
Plus you can do push metrics as well as shown in our app insights, Prometheus and other samples.
Let's continue the conversation in our support channels?
Not sure if you are still looking for a solution for this. You should be able to do this currently using the NServiceBus.Extensions.Diagnostics.OpenTelemetry package from nuget. This is built by Jimmy Bogard and instruments NServiceBus with the required support for Open Telemetry.
The source for this is available here. You can connect this to any backend of your choice that supports Open Telemetry including but not limited to Jaeger and Zipkin.
Additionally, here is an example that shows this in action.
Related
I have an application written in Python (PIKA) and C# (official NuGet package). Those applications are publishing new messages into RabbitMQ queues.
Until now, I used this syntax to publish a new message into the queue:
model.BasicPublish(exchange, routingKey, basicProperties, body);
I found that BasicPublish function always returns with success. I also read in RabbitMQ documentation that in case of broker destroyed, the messages that didn't send yet will be removed without sending it to RabbitMQ.
I want to avoid the loss of messages. So, I found 3 options to submit those messages to publish:
Transaction - Very slow.
Confirmation - I found it tricky to implement in a multi-threaded environment.
with REST API - What do you think about that?
I think that it will be ideal for me yo use REST API for inserting messages into queues.
The Question:
The way that I found to send a message with API is to send POST message to this endpoint:
http://localhost:15672/api/exchanges/vhost/amq.default/publish
As you can see, this port (15672) belongs to the RabbitMQ management system.
Is this the right way to use RabbitMQ with REST API?
Can I trust the RabbitMQ management system in the production environment?
Can you recommend an alternative to REST API that will accept to message enqueue immediately after insertion (blocking)?
No, don't use the HTTP API. It is not intended for production use for publishing or consuming messages.
You must use publisher confirms. The technique described in this tutorial applies to the .NET client library as well.
You could also investigate libraries written on top of the official .NET library that may correctly implement publisher confirms for you. EasyNetQ is one such library.
Another good resource to read with concern to 100% reliability is this blog post.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
I use a API client NuGet package that sends HTTP requests and receives responses from a third party API. How can I capture and log the HTTP requests and responses executed by that NuGet package in order to store them in a log database?
Example:
var client = new ThirdPartyPackage.Client();
var todos = client.fetchTodos(); // how to log the HTTP request/response executed by the third party package?
Specific example: https://github.com/exactonline/exactonline-api-dotnet-client/blob/master/test/ExactOnline.Client.Sdk.IntegrationTests/ExactOnlineQueryTests.cs#L21
IIS already does the logging for you. You can find the logs in the folder:%SystemDrive%\inetpub\logs\LogFiles
You can customize the log schema as you wish. you dont need a Nuget package for this. Or if you want, you can use Nlog
The library you're using appears to use WebRequest under the hood to perform its HTTP requests. Therefore, you should be able to set the WebRequest.DefaultWebProxy property to intercept the requests.
https://msdn.microsoft.com/en-us/library/system.net.webrequest.defaultwebproxy(v=vs.110).aspx
(Source code ref: https://github.com/exactonline/exactonline-api-dotnet-client/blob/master/src/ExactOnline.Client.Sdk/Helpers/ApiConnector.cs#L167)
Be warned however this is potentially a lot of work depending on exactly how much information you wish to capture about the request, so if I were you I'd seriously consider forking the library and making changes to their code to provide some hooks for logging.
The benefits of the DefaultWebProxy approach are that once it's up and working it shouldn't need much maintenance, the negatives are that it's potentially a lot of work up front and is adding another failure point. The benefits of forking the library are that it should be quicker to implement initially, but potentially more ongoing maintenance as you may need to merge any changes to the original SDK manually into your fork. Given that the package you're using has barely changed in 2 years however this seems like an acceptable risk.
In addition, if you go the fork route then you can always send the original repository maintainers a pull request, which would hopefully mean your code eventually ends up in the Nuget package and you can then revert back to Nuget instead of your fork.
We have C# application using SignalR and Amazon's ElastiCache as backplane. However even SignalR allows to mask out certain commands it stills sends a CONFIG to the ElastiCache which fails SignalR silently (CONFIG is not supported by ElastiCache). For now we compile our own binary of SignalR with the change of removing the auto reconfiguration routine.
I wonder if anyone else tripped over this issue and wanted to see how you solved it.
The best idea would be to write a proxy for ElastiCache (like the Twitter proxy) but that is a huge undertaking.
Thanks in advance.
In this case client is important and Baking your own SignalR definitly bad practice. Did you check this page http://www.asp.net/signalr/overview/performance/scaleout-with-redis: This method uses StackExchange.Redis(StrongName) and StackExchange.Redis has many options for connection.
We are using same method described in the page on AWS with Elasticache Redis and we don't have any issues you had...
Regards...
I'm trying to send messages to a rabbitmq server however I can't find any documentation on how to do this in c#, it only tells you how to do it in python, and I would like some help on this.
thanks =]
You should download the c# AMQP client from here.
There is comprehensive documentation inside the download package.
You can also download just the PDF User guide. This provides documentation on how to use the client C# API.
Also, if you have the option, the EasyNetQ project provides a very easy programming model around the base C# AMQP client. It is worth checking out.
See this (general info)
http://www.rabbitmq.com
And this for .Net
http://www.rabbitmq.com/dotnet.html
For instance, API
http://www.rabbitmq.com/api-guide.html
Tutorial (Java and Python)
http://www.rabbitmq.com/tutorials/tutorial-one-java.html
UserGuide (C#)
http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v3.1.1/rabbitmq-dotnet-client-3.1.1-user-guide.pdf
All: Are there any free solutions out there for sending text messages (SMS) via .net? (maybe a web service or something?).
EDIT
What I'm really looking for is a reference for a reputable online service that I can use for sending SMS messages. Has anyone out there used such a service, and if so, can you give me a recommendation/warning?
EDIT
(first the disclaimer: I'm not in any way associated with this company, I'm just posting back what I found, in case anyone else out there is looking)
An update: I ended up going with www.clickatel.com My work was for a technology exploration and demo project,and I could buy credits on that system cheap. In my case, I started out using their REST API. I had problems with that api (sometimes the commands would timeout). So I switched to the web service API (SOAP) It worked very well for me.
Most accept email but it is vendor specific.