Comments (3)
Adding some detail:
Using the echo program from /examples and the mkcert setup. On macOS Catalina 10.15.7.
miniqueue % go run echo.go
> foo
Published message foo to topic test_topic
Consumed message: foo
> bar
Published message bar to topic test_topic
Consumed message: bar
> hello there
Published message hello there to topic test_topic
Consumed message: hello there
>
Getting ERR failed decoding command error=EOF error with the subscribe endpoint, but the data comes back to the client program. Welcome any suggestions/fixes.
4:14PM INF starting miniqueue port=:9999
4:14PM INF publishing to topic handler=publish request_id=c1397irrbdg6m98fropg topic=test_topic
4:14PM INF subscribing to topic handler=subscribe request_id=c1397irrbdg6m98froq0 topic=test_topic
4:14PM INF client disconnected while waiting for message cmd=ACK handler=subscribe request_id=c1397irrbdg6m98froq0 topic=test_topic
4:14PM ERR failed decoding command error=EOF handler=subscribe request_id=c1397irrbdg6m98froq0 topic=test_topic
4:15PM INF publishing to topic handler=publish request_id=c1397lrrbdg6m98fror0 topic=test_topic
4:15PM INF subscribing to topic handler=subscribe request_id=c1397lrrbdg6m98frorg topic=test_topic
4:15PM INF client disconnected while waiting for message cmd=ACK handler=subscribe request_id=c1397lrrbdg6m98frorg topic=test_topic
4:15PM ERR failed decoding command error=EOF handler=subscribe request_id=c1397lrrbdg6m98frorg topic=test_topic
4:15PM INF publishing to topic handler=publish request_id=c1397q3rbdg6m98frosg topic=test_topic
4:15PM INF subscribing to topic handler=subscribe request_id=c1397q3rbdg6m98frot0 topic=test_topic
4:15PM INF client disconnected while waiting for message cmd=ACK handler=subscribe request_id=c1397q3rbdg6m98frot0 topic=test_topic
4:15PM ERR failed decoding command error=EOF handler=subscribe request_id=c1397q3rbdg6m98frot0 topic=test_topic
from miniqueue.
G'day @darsenault, thanks a lot for issue.
Regarding setting up a subscriber, along with your subscribe POST you need to pass through the command "INIT" in order to specify creating a new subscriber. I understand this may seem a little unintuitive, but it is in order to leave some room to expand the subscription with group functionality in the future. Therefore, if you adjust your CURL to the following it should hopefully consume a single message.
curl --insecure --cacert certs/ca.key --key certs/node.key --cert certs/node.crt -X POST https://localhost:9999/subscribe/foo -d "\"INIT\""
Keep in mind that CURL doesn't support keeping the connection open and continuously reading the body (or at least that I'm aware of), so I'd recommend you play around with the demos to get a better handle on how things work.
Regarding the errors you're seeing. Those are just due to client disconnects, I believe I fixed them in a recent release as they shouldn't be of error
severity. However maybe I'm mistaken. I'll double check and sort them out if not. They should have no effect on functionality.
Cheers!
from miniqueue.
Fixed in v0.8.0
from miniqueue.
Related Issues (5)
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 miniqueue.