Commit Graph

116 Commits

Author SHA1 Message Date
Erik Hollensbe
4107733453 Memory registry from #801 with additional tweaks (#951)
* PoC: memory registry using maps instead of slice madness

* Updated proto and handlers. Fixed tests across codebase.

* Implemented ttl pruning for memory registry

* Added extensive memory registry tests

* Squased a bunch of bugs

* Proto indent; memory.Registry.String() returns "memory"

* Write a test to prove memory registry TTLs are busted

Signed-off-by: Erik Hollensbe <github@hollensbe.org>

* Additional memory testing and fixups:

* DefaultTTL removed
* When TTL == 0, it is automatically removed from expiry conditions
* Additional improvements to new tests

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2019-11-16 10:55:11 +00:00
tegk
f88518d994 used gofmt with -s flag on whole project 2019-11-01 15:07:53 +00:00
Asim Aslam
a89d1edc41 fix divide by zero bug 2019-10-19 08:11:05 +01:00
Asim Aslam
3aedea4c56 strip topic from http broker subscribe service name 2019-10-17 18:37:37 +01:00
Asim Aslam
86984a8a8a Extend the stream timeout 2019-10-04 16:44:21 +01:00
Asim Aslam
e36960612a go fmt 2019-10-04 16:40:16 +01:00
Asim Aslam
04320d69ff Fix and comment broker service 2019-10-04 16:30:03 +01:00
Asim Aslam
05eacd74c8 Add logging for broker handler 2019-10-03 17:30:37 +01:00
Asim Aslam
4de346920f Add broker service implementation 2019-10-03 16:19:02 +01:00
magodo
0baea58938 wait nats drain since it's asynchronous
1. nats subscription draining is removed, since it is asynchronous,
   and there is no reliable way to detect when it is finished.
   Remove this option to avoid confusion.
2. nats connection draining is kept, and use 2 callbacks to detect
   draining timeout (timeout is set via `nats.Options`) or finish.
3. Also honour options passed in `broker.Init()` (previously only
   `broker.New()` is honoured).
2019-08-07 17:58:45 +08:00
1217ca94b1 bunch of other ipv6 fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-18 08:59:53 +03:00
e688ab0a45 fix ipv6 addr parsing and using
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-17 12:20:29 +03:00
008749b2b0 broker memory: fix issue with publish/subscribe
mutex locking have errors, so when two service (one pub, other sub)
try to use this broker it waits for mutex release and nothing works

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-13 00:04:53 +03:00
Asim Aslam
c5dd737568 Add back in broker address 2019-07-10 19:58:30 +01:00
Asim Aslam
e0bf1c2283 Remove Port from registry 2019-07-08 08:01:42 +01:00
Asim Aslam
4b4ad68eb9 Change Publication to Event 2019-07-07 12:44:09 +01:00
Asim Aslam
79b03a6825 add broker args 2019-07-07 12:36:14 +01:00
Asim Aslam
c1097a4509 strip broker address 2019-07-07 12:33:47 +01:00
ab692ff590 remove mock data from memory registry
memory registry can be used as fast inprocess registry,
so mock data needs to be in tests only

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-06-13 00:51:56 +03:00
Milos Gajdos
a29ce20e31
Changed default NATS address to nats://127.0.0.1:4222 in nats test 2019-06-06 12:06:14 +01:00
Asim Aslam
fe060b2d0b gofmt 2019-06-03 15:56:22 +01:00
Asim Aslam
fcf11011b8 remove rcache 2019-05-31 16:19:31 +01:00
Asim Aslam
ca769444e7 set localhost for nats 2019-05-31 13:18:22 +01:00
Asim Aslam
aeeb2b0010
Merge pull request #489 from micro/nats
Add nats broker as a default
2019-05-31 13:12:38 +01:00
Asim Aslam
4035ab5c7b Change go-log links 2019-05-31 00:38:05 +01:00
Asim Aslam
b4874806df Add util 2019-05-30 23:52:10 +01:00
Asim Aslam
1200386097 Add nats broker as a default 2019-05-29 16:46:57 +01:00
Asim Aslam
b4dc822ae3 Change context key to string 2019-05-29 10:58:41 +01:00
ac1afea7fc add context to server.SubscriberOptions and broker.SubscribeOption
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-01-24 15:36:01 +03:00
Asim Aslam
d8ba18deff change logging 2019-01-22 12:18:33 +00:00
Asim Aslam
5b95ce7f26 Silence broker during tests 2019-01-16 18:54:04 +00:00
Asim Aslam
39c24baca9 rename mock things to memory 2019-01-14 15:27:25 +00:00
Asim Aslam
c086c33bb3 remove codecs 2019-01-10 09:42:02 +00:00
Asim Aslam
7c2cbe2ad2 better error handling 2019-01-03 11:23:06 +00:00
Asim Aslam
abbeb6d068 add inbox feature to http broker 2019-01-02 19:27:46 +00:00
Asim Aslam
9c2689301c add mock package comments 2018-12-01 12:56:21 +00:00
Asim Aslam
92082ac927 NewSubscribeOptions 2018-11-30 17:32:48 +00:00
Asim Aslam
c622f3a8d6 Force http2 usage of broker client 2018-11-29 12:10:33 +00:00
Shulhan
415fb3a730 all: replace "pborman/uuid" with "google/uuid"
Internally, "pborman/uuid.NewUUID()" is calling "google/uuid.New()"
that return nil when there is an error [1].

Both package use the same license.

[1] https://github.com/pborman/uuid/blob/master/version1.go#L17
2018-11-21 17:29:21 +07:00
Asim Aslam
1cb40831a4 add http handler option for broker 2018-11-18 20:40:43 +00:00
Mikhail Grachev
4006d9f102 Add errors check 2018-11-13 11:56:21 +03:00
Asim Aslam
9d3cb65daa set broker address on Init 2018-08-18 17:28:58 +01:00
Jasim Muhammed
356cf82af5 Fixing httpBroker dead lock; If publish is called from a subscription 2018-06-13 10:28:39 +04:00
Asim Aslam
c666558f8c make the broker/transport listen on new addr when stop/started with addr :0 2018-05-25 15:19:25 +01:00
Asim Aslam
e55437698b misc moved to util 2018-04-08 12:37:45 +01:00
Asim Aslam
c9b40cb33b switch to stdlib context 2018-03-03 11:53:52 +00:00
Asim Aslam
1890ec7044 rc is not used 2017-10-28 13:55:59 +01:00
Asim Aslam
bd46e60c13 optimise http broker with rcache 2017-10-26 20:48:11 +01:00
Asim Aslam
32b7ebcfbc use updated error formatting 2017-06-11 13:02:08 +01:00
Asim Aslam
bab586b71e make use of micro/go-log 2017-05-11 20:43:42 +01:00