Spring Cloud Contract with Spring Kafka - spring-kafka

Does Spring Cloud Contract support Spring Kafka message contract verification out of the box?

If you're using Spring Cloud Stream with a Kafka binder then yes it should work out of the box. Where out of the box means that either you can have the infra completely stubbed out (via the test binder) or you can connect to a real kafka instance and send real messages to it.

Here is a repo with examples of using spring-cloud-contract with messaging (stated under the producer section) which should apply to Kafka as well.
https://github.com/spring-cloud-samples/spring-cloud-contract-samples
The example .groovy file with the contract is located here.

Related

Can SoapUi publish arbitrary messages onto a JMS Queue?

In the past my team has often used SoapUi to create automated tests around our SOAP webservice. Now we would like to create automated tests around our app's JMS communication. Therefore, we need to configure SoapUi to publish to and consume from our JMS queues.
The SoapUi website explains how to publish SOAP messages to a JMS queue. But this does not fit my usecase; my app sends arbitrary text messages over JMS without conforming to a SOAP contract.
Is SoapUi able to publish arbitrary text messages to a JMS queue, or must my messages conform to a SOAP contract defined by a wsdl? How would I configure SoapUi to publish these messages without it creating a dummy SOAP interface for the JMS connection to reside in?
The free version of SoapUi is intended to use test SOAP and REST. As the above link shows, SoapUi can be configured - through its GUI - to send messages over JMS only when these messages conform to a SOAP contract. However, SoapUi is also able to execute Groovy scripts, and these Groovy scripts can publish arbitrary messages to JMS. With the help of my team, I wrote a Groovy script which imports a Java library and uses this to publish arbitrary JMS messages.

How to efficiently develop spring-boot microservice that synchronise data in real-time with firestore of google firebase cloud?

The work method Firebase suggests and recommends is to link the Front-End application directly with the FireStore database service, and this provides real-time synchronization between the data in the Front-End application and the documents in FireStore, which is managed by the AdminSDK Firebase.
However, I would like to implement a business layer (following a micro-services architecture) with Spring-boot, but in this case it is up to me to manage the synchronization in real time between my micro-services and the front-end application.
So, How to efficiently develop spring-boot microservice that synchronise data in real-time with firestore of Google Firebase Cloud ?
Which framework or protocole I would use to brige this fonctionality ?
In my opinion, you could pass this by adding fabiomaffioletti (specific connector to firebase -- you could find it on github), you can refactor your entities by changing it to #FirebaseDocument("/people") to the entry point on firebase /people,
This denpendency would give the same actions as a normal repository by creating an interface anotate by repository that can give spring boot the possibility to scan the
repositories
#Repository
public class PeopleRepository extends DefaultFirebaseRealtimeDatabaseRepository<People, long> {
}
Don't forget to add #EnableFirebaseRepositories on your main apllication class.
Finaly on your properties file add this properties to precise the firebase end-point:
firebase.service-account-filename=[classpath|file]:[service-account-filename].json
firebase.realtime-database-url=[realtime database url]
Hope this would help you.
My apologize for my bad english :D

Cloudfoundry actuator endpoints in a .net core console application hosted by GenericHost

I have a question about CloudFoundry actuator endpoints in a .net core console application using Steeltoe. I am planning to use generic host https://jmezach.github.io/2017/10/29/having-fun-with-the-.net-core-generic-host/ to perform some background task. I would like to use few actuator endpoints e.g.Health actuator. I could find samples with WebHost here https://github.com/SteeltoeOSS/Samples/blob/dev/Management/src/AspDotNetCore/CloudFoundry/Startup.cs. The below code needs IApplicationBuilder
// Add management endpoints into pipeline
app.UseCloudFoundryActuators();
So it is possible to use actuator endpoints in a console application which is hosted by generic host. Any samples are most welcome. Thanks in advance.
Steeltoe 3.0 added a variety of extensions for using Management/Actuators with HostBuilder. Check out this file for some examples.
It would also be possible to add another implementation of the actuator endpoints that communicate over something other than HTTP (perhaps RabbitMQ as an example), Steeltoe Management was built with portable base endpoint functionality in mind - but then you would also need a new application for interacting with them, and you wouldn't be able to use them with Apps Manager on PCF.

Pact with Spring Cloud Streams

I want to adopt to PACT contract for micro-services. I am using Spring Cloud Stream and I want to integrate contract with Kafka. Is it possible to do so?
TIA.

Push data in Microsoft Health Cloud Service

The available API provided only exposes methods for getting activity details information. Is there an option to push data in this service ?
Microsoft Health Cloud API
No, the current preview version of the Microsoft Health Cloud API does not expose a means to add data to the service.

Resources