chris-ricketts / actix-broker Goto Github PK
View Code? Open in Web Editor NEWMessage broker for the Actix actor framework
License: Apache License 2.0
Message broker for the Actix actor framework
License: Apache License 2.0
Hi,
With actix-web
getting stable and using actix
0.8.2, actix-broker
can no longer be used with the latest version since it depends on actix
0.7.9.
Bumping the version to actix
0.8.2 and updating the examples should be straightforward. I'll submit a PR.
Motivation:
The vast majority of my actix-web application is implemented as actors, however there are some parts which are more convenient to implement as normal or async methods.
I want to be able to notify running actors of something that happened in a normal method, but there is no actor context.
Workaround:
Create a sentinel actor that sends the message (generic version untested):
struct Notifier<T>(T);
impl<T: Message> Actor for Notifier<T> {
type Context = Context<Self>;
fn started(&mut self, ctx: &mut Self::Context) {
self.issue_system_async(self.0);
ctx.stop();
}
}
like as a PR that fixes actix/actix#256?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.