[JAVA] Try using the messaging system Pulsar

Overview

I've been researching and finding a messaging system, so I'll give it a try.

Yahoo! OSS messaging system provided by inc. https://github.com/yahoo/pulsar It seems that high-speed messaging can be exchanged using a resident process.

What is Pulsar

It is organized in an easy-to-understand manner below. https://techblog.yahoo.co.jp/infrastructure/pulsar_introduction/

For details, please see the above article.

With a rough feeling

When the producer sends the message "weak yen" on the topic news, the consumer who is preparing to receive the topic news receives the "weak yen" message.

I will try using it for the time being

Drops the tar.gz file (1.15.2 seems to be the latest at the moment)

$ wget https://github.com/yahoo/pulsar/releases/download/v1.15.2/pulsar-1.15.2-bin.tar.gz

Please check the latest version from the following. https://github.com/yahoo/pulsar/releases

Defrost

$ tar xvfz pulsar-1.15.2-bin.tar.gz

Launch pulsar in standalone mode.

Pulsar provides Standalone (Broker, BookKeeper, Zookeeper all run on one server) mode.

$ cd pulsar-1.15.2
$ bin/pulsar standalone

Next, launch the consumer process.

$ bin/pulsar-client consume -s 'sub' 'persistent://sample/standalone/ns1/my-topic'

Next, let's send a message in the producer process.

$ bin/pulsar-client produce -m 'hello' 'persistent://sample/standalone/ns1/my-topic'

Then, the message hello sent from the producer arrived at the consumer side.

In the gif below, the screen on the left is the consumer and the screen on the right is the producer. pulsar-movie-gif.gif

Summary

Recommended Posts

Try using the messaging system Pulsar
Try using || instead of the ternary operator
Try using the service on Android Oreo
Try using the Rails API (zip code)
Try using the Emotion API from Android
Try using the Wii remote with Java
Try using the messaging system Pulsar
Implement the box ball system with Processing
Try using Maven
Try using powermock-mockito2-2.0.2
Try using GraalVM
Try using jmockit 1.48
Try using sql-migrate
Try accessing the dataset from Java using JZOS
Try using the COTOHA API parsing in Java
Try using Axon Framework
Try using JobScheduler's REST-API
Try using java.lang.Math methods
Try using PowerMock's WhiteBox
Try implementing the Eratosthenes sieve using the Java standard library
Try global hooking in Java using the JNativeHook library
Try using Talend Part 1
Try using F # list
Differences in code when using the length system in Java
Command to try using Docker for the time being
Try using each_with_index method
Try using the query attribute of Ruby on Rails
Try using Spring JDBC
[Rails] Create an echo bot using the LINE Messaging API.
[Java] Try editing the elements of the Json string using the library
Try launching a webAP server on the micro using Helidon
Try using the MZ platform that supports SME IT / IoT
Try using RocksDB in Java
Try using GloVe with Deeplearning4j
Try using view_component with rails
Try scraping using java [Notes]
Try using Cocoa from Ruby
Try using letter_opener_web for inquiries
[Swift] Try using Collection View
Let's try the S2Struts tutorial (# 3_180425)
Let's try the S2Struts tutorial (# 5_180526)
Let's try the S2Struts tutorial (# 4_180505)
Let's try the S2Struts tutorial (# 1_180423)
Try using IntelliJ IDEA once
Let's try the S2Struts tutorial (# 2_180424)
Try using Spring Boot Security
Try using gRPC in Ruby
SwiftUI-Display the map using MapKit
[Rails] Try using Faraday middleware
[Processing] Try using GT Force.
Try the Spring WebFlux tutorial
[Programming Encyclopedia] ยง2 Try using Ruby
People using docker Try using docker-compose
[Java] Try to solve the Fizz Buzz problem using recursive processing
Try using the two-point measurement function of Firebase Performance Monitoring. [Android]