Feather

Ultra-lightweight publish-subscribe message broker.

License

License

MIT
Categories

Categories

Feather Application Layer Libs Dependency Injection
GroupId

GroupId

com.joepritzel
ArtifactId

ArtifactId

feather
Last Version

Last Version

1.2
Release Date

Release Date

Type

Type

jar
Description

Description

Feather
Ultra-lightweight publish-subscribe message broker.
Project URL

Project URL

https://github.com/Joe0/Feather
Source Code Management

Source Code Management

https://github.com/Joe0/Feather

Download feather

How to add to project

<!-- https://jarcasting.com/artifacts/com.joepritzel/feather/ -->
<dependency>
    <groupId>com.joepritzel</groupId>
    <artifactId>feather</artifactId>
    <version>1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.joepritzel/feather/
implementation 'com.joepritzel:feather:1.2'
// https://jarcasting.com/artifacts/com.joepritzel/feather/
implementation ("com.joepritzel:feather:1.2")
'com.joepritzel:feather:jar:1.2'
<dependency org="com.joepritzel" name="feather" rev="1.2">
  <artifact name="feather" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.joepritzel', module='feather', version='1.2')
)
libraryDependencies += "com.joepritzel" % "feather" % "1.2"
[com.joepritzel/feather "1.2"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Feather

Feather is an extremely lightweight publish-subscribe message broker (event bus). It supports both topic (through types) and content (through a predicate) based filtering. The goal of Feather is to maximize message throughput.

Build Status

Table of contents:

Features

  • Strategy based - Allows you to provide strategies to specify how the broker does things. This allows you to optimize for different things by simply changing how you create the broker.
  • Asynchronous - Everything can run asynchronously, as well as synchronously. Just provide a strategy that does what you want.
  • Filters - A simple yet flexible filter system. Every subscriber is filtered by types, and it is optionally filtered by a predicate. All you need to do is implement the PredicatedSubscriber class and the applies method.
  • Unread messages - Catch any message that was not received by a subscriber just by creating a subscriber that listens for UnreadMessage.
  • Lightweight - Feather is extremely lightweight and doesn't bring in any bloat, redundant concepts or confusing features.
  • Fast - Faster than other publish-subscribe frameworks by orders of magnitude. Check out the case study.

Usage

How to create the publish-subscribe message broker and set up for use: ```Java // Use a builder to create a new PSBroker. // The builder allows you to provide customizable strategies for the broker to use. PSBroker broker = new PSBrokerBuilder().build(); ``` How to create a subscriber: ```Java public class UnreadMessageReader extends Subscriber { @Override public void receive(UnreadMessage message) { // insert logic here } } ``` How to let the broker know what messages a subscriber is listening to: ```Java broker.subscribe(new UnreadMessageReader(), UnreadMessage.class); ``` How to send a message that subscribers can receive: ```Java broker.publish("Hello world!"); ``` For complete examples, check out the examples in the src/example directory.

License

This project is distributed under the terms of the MIT License. See file "LICENSE" for further information.

Versions

Version
1.2
1.1