Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eigr/astreu
High-performance Messaging System based on a gRPC protocol
https://github.com/eigr/astreu
grpc message-broker message-bus message-queue messaging network
Last synced: about 2 months ago
JSON representation
High-performance Messaging System based on a gRPC protocol
- Host: GitHub
- URL: https://github.com/eigr/astreu
- Owner: eigr
- License: apache-2.0
- Created: 2021-01-28T02:18:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T01:39:37.000Z (over 3 years ago)
- Last Synced: 2024-05-02T01:15:31.866Z (9 months ago)
- Topics: grpc, message-broker, message-bus, message-queue, messaging, network
- Language: Elixir
- Homepage: https://eigr.io/astreu
- Size: 6.59 MB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Astreu
**High-performance Messaging System based on gRPC protocol written in Elixir** (***this is a WIP no production ready***)
![Astreu CI](https://github.com/eigr/Astreu/workflows/Astreu%20CI/badge.svg) [![Astreu Release](https://github.com/eigr/Astreu/actions/workflows/release.yml/badge.svg)](https://github.com/eigr/Astreu/actions/workflows/release.yml)
## Architecture Overview
```
+-------------------------------+
| Astreu |
| |
| +---------------------------+ |
+-------------+ | | Management API | | +-------------+
| Subscribers | | +---------------------------+ | | Producers |
+-------------+ | Bi-directional | +---------------------------+ | Bi-directional | +-------------+
+---------------| +----------------->+ | PubSub Adapters | +------------------>+ | +-------------+
| | | || | Streams | +---------------------------+ | Streams | | | | | |
| | | || +<-----------------+ +---------------------------+ +<------------------+ | | | | |
| | +-------------+ | | Core Protocol | | +-------------+ | |
+-+-------------+ | +---------------------------+ | +-------------+ |
| +---------------------------+ | +-------------+
| | gRpc Server | |
| +---------------------------+ |
+-------------------------------+```
## Usage and Installation
* Run:
```
# docker run --rm --net=host -e RELEASE_NODE=unique_name_peer_node eigr/astreu:0.1.2
```* Connect as a Producer to the server from an SDK (Java SDK example below):
```java
public static void main(final String[] args) {final Producer producer =
Astreu.at("127.0.0.1", 9980)
.asPub("test", UUID.randomUUID().toString().toLowerCase());final Publisher publisher = producer.bind();
Flux.from(publisher).subscribe(replyMessage -> {
replyMessage.logger().info("Reply Message -> {}", replyMessage);
});IntStream.range(0, 10).parallel().forEach(i -> {
producer.publish(
String.valueOf(i),
Any.newBuilder()
.setTypeUrl("io.astreu.custom/Text")
.setValue(ByteString.copyFrom(String.format("Hello World Astreu %s", i).getBytes()))
.build()
);
});
}
```* Connect as a Subscriber to the server from an SDK (Java SDK example below):
```java
public static void main(final String[] args) {
final Publisher publisher =
Astreu.at("127.0.0.1", 9980)
.asSub("test", "unique-subscription")
.receiveOnly(MessageType.EXCHANGE)
.bind();Flux.from(publisher).subscribe(messageWithContext -> {
final AcknowledgeContext context = messageWithContext.getContext();context.logger().debug("Message type is -> {}", messageWithContext.getType());
final Exchange message = messageWithContext.getMessage();context.logger().info("Incoming Message {}", message);
context.accept();
});
}
```## Client SDK's
* [Astreu4j](https://github.com/eigr/astreu4j)
* [GO Lang Astreu](https://github.com/eigr/astreu-go)