Comments (7)
Not sure if I am following this…no message is published to the MQTT server if you omit the handler in the config? Do you have any error messages in the stdout when you omit it?
Can't you just use the Tortoise.Handler.Default
handler if you don't want to see log messages printed to stdout?
from tortoise.
Not sure if I am following this…no message is published to the MQTT server if you omit the handler in the config?
Right. Probably because the application crashes and is restarted afterwards.
Do you have any error messages in the stdout when you omit it?
I didn't get any error messages that's why the problem was particularly hard to identify.
Can't you just use the Tortoise.Handler.Default handler if you don't want to see log messages printed to stdout?
Yes, that works.
I just thought that it was counterintuitive to manually have to specify a Tortoise.Handler
in order to effectively use no handler.
I'd recommend setting the Tortoise.Handler.Default
handler if the user doesn't specify any handler.
from tortoise.
I think I will let the upcoming version of Tortoise crash if no handler has been specified. The handler will be more important in the future, as MQTT5 is more complex, and the user will have to take more callbacks into consideration.
Sorry for the late reply. I have been busy with life, and I hope I can get to add more maintainers when I am done with the MQTT 5 branch. Hope tortoise works well for you—would it be okay for me to close this issue ?
from tortoise.
I think I will let the upcoming version of Tortoise crash if no handler has been specified. The handler will be more important in the future, as MQTT5 is more complex, and the user will have to take more callbacks into consideration.
If it is necessary with MQTT 5 to always set a handler, then that's ok.
The point I am trying to make is that if the library can be used without a handler, then the user shouldn't manually have to specify that they want to use the Tortoise.Handler.Default
handler.
If MQTT 5 requires the user to always define a custom handler, then this issue probably won't appear.
from tortoise.
I like that the user need to make a conscious choice of what should happen in the MQTT connection life-cycle. As such the Logger handler is only included to make it easy to get going, and for people to have an example to work from when they start implementing their own handler—the default one is there to use in integration tests where I don't care about the log output.
from tortoise.
I see. I get your design decision.
The issue can be closed.
from tortoise.
Cool; once again, thanks for using Tortoise…I am always happy to hear what you are using it for, so please share if you want and are allowed to :)
from tortoise.
Related Issues (20)
- Subscription issues with vernemq HOT 1
- Can you give me a example HOT 4
- Handle :ping_timeout more gracefully? HOT 1
- Beam VM becomes stucked when the number of connections is high HOT 5
- Specifying a handler module that does not implement the handler behaviour fails unintuitevly HOT 1
- errors when restarting broker HOT 2
- Questioning the handling of clean_session HOT 3
- Error on use ActiveMQ Artemis (MQTT protocol enabled) HOT 3
- AWS IoT and publish freeze on Nerves HOT 3
- No matching handle_info in Tortoise.Connection HOT 1
- subscribe can timeout for no good reason HOT 5
- Send messages from Elixir to Tortoise.Connection HOT 4
- Publishing a message fails when there is no connection to a broker HOT 1
- "Unexpected async result" and need to explicitly re-subscribe to topics. HOT 8
- Best way to restart connections? HOT 1
- Safest way to disconnect redundantly? HOT 1
- tortoise311 fork? HOT 5
- unknown registery: Tortoise.Regsitry HOT 1
- How to provide backpressure when too many incoming messages?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tortoise.