# How to write a custom actor that also acts as an observable?

**URL:** <https://discourse.julialang.org/t/how-to-write-a-custom-actor-that-also-acts-as-an-observable/107808>\
**Category:** General Usage\
**Tags:** reactiveprogramming, rocket\
**Created:** [December 19, 2023, 9:36am UTC](https://discourse.julialang.org/t/how-to-write-a-custom-actor-that-also-acts-as-an-observable/107808 "2023-12-19T09:36:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![g-gundam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/g-gundam/32/47593_2.png) [@g-gundam](https://discourse.julialang.org/u/g-gundam)\
**Post date:** [December 19, 2024, 4:15pm UTC](https://discourse.julialang.org/t/how-to-write-a-custom-actor-that-also-acts-as-an-observable/107808/2 "2024-12-19T16:15:44Z")

</div>

> [@oliviermilla](#):
>
> Actor1 is not a Subject as it takes different input and output

Apologies for reviving an old thread, but I’ve been using Rocket.jl for a few weeks so far, and I had a similar need. I also didn’t know subjects were not allowed to have different types for inputs and outputs, because what I did to solve it was implement a custom Subject.

I can’t help but feel that I’m probably not using Rocket.jl correctly, but… at the same time, it’s actually working really well for my needs. I’m a little embarrassed to admit that it helped me find a solution to a data-flow organization problem that had me stumped for a couple of years.

## Oh!

You’re the [Lucky.jl](https://github.com/oliviermilla/Lucky.jl) guy. That’s the reason I’m using Rocket.jl in the first place. It was a huge revelation for me. My current experimentation takes a lot of inspiration from Lucky.jl (which is a great name btw), and I’m very thankful for your work.

- [Backtesting framework - #13 by g-gundam](https://discourse.julialang.org/t/backtesting-framework/47351/13)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-write-a-custom-actor-that-also-acts-as-an-observable/107808)._
