Skip to content

Commit 8af6933

Browse files
author
Tejas Wanjari
committed
First draft
Signed-off-by: Tejas Wanjari
1 parent 8ffab73 commit 8af6933

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2400
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313

1414
# Dependency directories (remove the comment below to include it)
1515
# vendor/
16+
17+
# Others
18+
.DS_Store
19+
.idea/

README.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,63 @@
11
# go-proto-stomp
2-
STOMP Protocol Client/Broker Implementation in Golang (with interactive cli)
2+
3+
## STOMP Protocol Implementation in Golang (with interactive CLI)
4+
5+
Includes:
6+
1. `stomp`: STOMP Broker/Client Library
7+
2. `stompd`: STOMP Broker
8+
3. `stomper`: Interactive CLI for STOMP Client
9+
10+
## stomper
11+
12+
![stomper demo](stomper.gif "stomper")
13+
14+
## stompd
15+
16+
## STOMP Library Documentation
17+
18+
## Installation
19+
20+
## **[STOMP Protocol Specification](https://stomp.github.io/stomp-specification-1.2.html)**
21+
The implementation adheres to the spec leaning towards the _version 1.2_ of the protocol.
22+
### STOMP Frame: Augmented BNF Form
23+
This implementation strictly follows the below grammar for frame construction and validation.
24+
```
25+
NULL = <US-ASCII null (octet 0)>
26+
LF = <US-ASCII line feed (aka newline) (octet 10)>
27+
CR = <US-ASCII carriage return (octet 13)>
28+
EOL = [CR] LF
29+
OCTET = <any 8-bit sequence of data>
30+
31+
frame-stream = 1*frame
32+
33+
frame = command EOL
34+
*( header EOL )
35+
EOL
36+
*OCTET
37+
NULL
38+
*( EOL )
39+
40+
command = client-command | server-command
41+
42+
client-command = "SEND"
43+
| "SUBSCRIBE"
44+
| "UNSUBSCRIBE"
45+
| "BEGIN"
46+
| "COMMIT"
47+
| "ABORT"
48+
| "ACK"
49+
| "NACK"
50+
| "DISCONNECT"
51+
| "CONNECT"
52+
| "STOMP"
53+
54+
server-command = "CONNECTED"
55+
| "MESSAGE"
56+
| "RECEIPT"
57+
| "ERROR"
58+
59+
header = header-name ":" header-value
60+
header-name = 1*<any OCTET except CR or LF or ":">
61+
header-value = *<any OCTET except CR or LF or ":">
62+
```
63+
## License

cmd/.DS_Store

6 KB
Binary file not shown.

cmd/stompd/stompd.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/tjs-w/go-proto-stomp/pkg/stomp"
7+
)
8+
9+
func main() {
10+
if err := stomp.StartTcpBroker("localhost", "8888"); err != nil {
11+
fmt.Println(err.Error())
12+
}
13+
}

cmd/stomper/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)