Not able to record events for karaf service using Java flight recorder(JFR) in JMC - karaf

I'm getting message like "this flight recording has no recording settings events" while recording events for karaf service.
Can any one please help me for this issue. I put the setting in service script under Karaf Arugs: like
-XX:+UnlockCommercialFeatures
-XX:+FlightRecorder

Related

Pausing Spring Cloud StreamListener for Google PubSub

We use Spring Cloud Stream(version 3.0.7) StreamListener to consume from Google cloud PubSub subscription 'A.SUB' from topic 'A'.
We have a requirement to pause consumption from PubSub, I see below options in the order of preference, I don't have exact idea on how to achieve options 1 and 2. Can someone please share thoughts on these?
Add another Pubsub Topic 'B' and publish 'Pause' event message to pause or 'Resume' event message to resume, somehow stop/start poller on subscription 'A.SUB' on seeing 'pause/resume'
Is there any way to achieve this?
Pause the subscription based on time window say between 12AM to 6AM? is there a way to specify some CRON expression?
Consume messages from 'A.SUB' and send nack between 12AM and 6AM
#StreamListener("A.SUB")
public void consume(Message message) { }
Note: StreamListener and the entire annotation-based configuration model has been deprecated. We've fully migrated to functional programming model which is much simpler.
With regard to pausing, you can accomplish it with actuator and binding endpoints (e.g., stop, start, pause, resume) exposed by s-c-stream. You can get more info here.

hystrix stream not responding

I am using spring-cloud-starter-hystrix:1.2.3.RELEASE in a Spring Boot application. I have 1 HystrixCommand, that I can execute successfully.
After that I called
localhost:8080/hystrix.stream
however this Request loads forever and doesn't respond. On Google I cannot find anything about this.
This happens if no command has been executed yet and therefor there are no metrics to publish in the stream.
The 'workaround' is to execute a Hystrix command.
This happens in Hystrix 1.5.8 and earlier. The behavior was changed in Hystrix 1.5.9 that was released yesterday. It will now publish a ping message if there are no metrics to publish.
This change was made to fix a bug where the stream would not detect closed connections when there were no metrics to publish. See Hystrix bug 1430 for more information.
Make sure you have the #EnableHystrixDashboard annotation added to the dashboard application. Then go to http://{dashboard-application:port}/hystrix.stream. On this page you will be asked to enter the URL of Hystrix application which is annotated with #EnableCircuitBreaker and of which you want to monitor the stream.

How can i use RabbitMQ for sending mobile push notifications?

Scope:
I have an app that i am starting to build that has the "subscriber/publisher" situation on it's core.
For those who don't know, the idea behind this schema is that:
1) Someone creates a "Topic"
2) Endpoints subscribe to a "Topic"
3) Any message published to a certain "Topic" is pushed to the subscribers of said "Topic"
Considerations:
I am going to use Xamarin.IOS and Xamarin.Android as the framework to build this mobile app (so that it can be crossplatform from the begining).
RabbitMQ:
The RabbitMQ service is built on top of the AMQP pattern which solves my entire problem of modeling the "Topic/Subscriber/Publisher" problem.
The Problem:
Now that I have the problem modeled via the RabbitMQ framework, I need those "Messages" that are "pushed" to each endpoint (mobile device) to actually be a "Push Notification" instead of the standard message that will arrive to that device.
How can I model my solution to accomplish that ?
Thanks in advance.
RabbitMQ can't send out the push notification itself.
For each message consumed from the a RabbitMQ queue, the "Consumer" service needs to invoke whatever push notification backend/API you are using (e.g. Firebase, AWS, etc.) using their SDK.

The Messenger service has not been started - NetSend notifications will not be sent

In my SQL Server agent, I did not set any notifications, then why this error is coming?
I run pakg through dtsexec it executes successfully, and also I run a simple job for inserting record it runs successfully, but when in job step I select file system and give package path and run job it gives me that error:
The Messenger service has not been started - NetSend notifications
will not be sent
I check in services.msc but there is no service like window messenger, I also check in gpedit, there is a window messenger, I apply its all three options enable,disabled, not configure one by one but did not get rid to that error.
any help will be appreciated, Thanks in advance.
This is an informational message that appears and can be safely ignored if you are not using net send alerts.
If you wish to send net send alerts then you have to set the Messenger service to at least Manual startup, preferably Automatic. Then you have to start the service.
It does a check to see if the Messenger service is running, if it isn't then it produces this message as information to say "I cannot send net sends" but it doesn't necessarily mean there is a problem if you are not using net send alerting.
Windows server 2008 have no messenger service at all. msdn forum topic with additional info about your problem. Just ignore it.

Servicemix/Camel : how to leverage OSGI to create "pluggable" bundles?

Scenario : I'll try to put an analogy with the loan broker example from the EIP book
The customer sends a quote request
(The loan broker requests customer credit score from the credit bureau)
The loan broker sends quote requests to each bank.
The problem
In my case point 1 and 2 are in the same camel context (or osgi bundle)
Each bank has a separate bundle, exposing endpoints to the loan-broker-bundle through NMR
loan-broker-bundle doesn't know about the banks beforehand since we keep partnering with new banks every now and then
What I did
Created a registry class and a bankDescriptor interface in loan-broker-bundle
each bank bundle when started calls the registery to add its bankDescriptor (spring init) that tells the loan broker what endpoint to call to get a quote.
loan-broker-bundle main route uses recipientList (a processor sets target endpoints by asking the registery) to route quote requests
The question
Hoping my description was clear enough, you can see that this is a really simple implementation. What are its limits ? How can i turn this registery into an osgi service ?
I developed a solution like this based on SpringDM for a client. There's a full write up of how to do this at http://www.jakubkorab.net/2012/05/system-integrations-as-plugins-using-camel-and-servicemix.html with full source code available at https://github.com/FuseByExample/smx-application-plugins
Hope that helps.
In OSGi there is a great registry at your disposal: The OSGi service registry. So my proposal is to do this slightly differently. Define a service interface for the quote requests and store it in a api bundle. Then let each bank implement this interface and publish the implementation as an OSGi service.
The loan broker bundle can then list all OSGi services in the OSGi service registry and call each to get the quote. In blueprint there is a nice tag that you can use to inject the list into a bean property of List. Spring DM perhaps has something similar.
Camel currently does not have way to call all OSGi services of a type. We discussed a new osgi service compomnent that would be able to do this. So probably we will soon have a solution.

Resources