Kiara is a Go equivalent of Phoenix PubSub that makes it easy for Go applications to communicate with each other.

Related tags

Network go golang pubsub
Overview

Kiara

ci status Go Reference

phoenix

Kiara is a Go equivalent of Phoenix PubSub that makes it easy for Go applications to communicate with each other.

Examples

demo chat application

Basic Usage (with Redis Backend)

package main

import (
	"context"
	"fmt"

	"github.com/genkami/kiara"
	adapter "github.com/genkami/kiara/adapter/redis"
	"github.com/go-redis/redis/v8"
)

type Message struct {
	From string
	Body string
}

func main() {
	var err error
	redisClient := redis.NewClient(&redis.Options{Addr: "localhost:6379"})
	pubsub := kiara.NewPubSub(adapter.NewAdapter(redisClient))
	defer pubsub.Close()

	channel := make(chan Message, 5)
	sub, err := pubsub.Subscribe("room:123", channel)
	if err != nil {
		panic(err)
	}
	defer sub.Unsubscribe()

	ctx := context.Background()
	msg := &Message{From: "birb", Body: "cock-a-doodle-doo"}
	err = pubsub.Publish(ctx, "room:123", msg)
	if err != nil {
		panic(err)
	}

	sent := <-channel
	fmt.Printf("%s: %s\n", sent.From, sent.Body)
}

Run Test

To run an entire test, you need to run Redis and NATS, and to tell their addresses to test cases by setting environment variables.

We have docker-compose.yml to set up these dependencies easily. To run tests with docker-compose, type these following commands:

$ docker-compose up -d
$ export KIARA_TEST_REDIS_ADDR=localhost:6379
$ export KIARA_TEST_NATS_URL=nats://localhost:4222
$ go test ./...

Codec

By default, messages are marshaled into gob format. You can specify which codec Kiara uses to marshal and unmarshal messages by passing WithCodec() to NewPubSub().

import "github.com/genkami/kiara/codec/msgpack"

pubsub := kiara.NewPubSub(
    adapter.NewAdapter(redisClient),
    kiara.WithCodec(msgpack.Codec),
)

Currently these codecs are officially available:

Custom Codec

You can implement your own codec by simply implementing Marshal and Unmarshal. For example, if you want to encode messages into WATSON, you have to implement WATSON codec like this:

import 	"github.com/genkami/watson"

type WatsonCodec struct{}

func (_ *WatsonCodec) Marshal(v interface{}) ([]byte, error) {
	return watson.Marshal(v)
}

func (_ *WatsonCodec) Unmarshal(src []byte, v interface{}) error {
	return watson.Unmarshal(src, v)
}

Backend-Agnostic

Kiara does not depend on specific message broker implementation. Currently these message brokers are officially supported:

You can change backend message brokers with little effort. Here are examples of connecting to Redis and NATS as a Kiara's backend.

Example(Redis):

import (
    "github.com/go-redis/redis/v8"
    adapter "github.com/genkami/kiara/adapter/redis"
)
redisClient := redis.NewClient(&redis.Options{Addr: "localhost:6379"})
pubsub := kiara.NewPubSub(adapter.NewAdapter(redisClient))

Example(NATS):

import (
    "github.com/nats-io/nats.go"
    adapter "github.com/genkami/kiara/adapter/nats"
)
conn, err := nats.Connect("nats://localhost:4222")
// error handling omitted
pubsub := kiara.NewPubSub(adapter.NewAdapter(conn))

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

This library is highly inspired by phoenixframework/phoenix_pubsub, nats-io/nats.go, and the majestic phoenix Takanashi Kiara.

Comments
  • Update golangci/golangci-lint-action action to v3

    Update golangci/golangci-lint-action action to v3

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | golangci/golangci-lint-action | action | major | v2 -> v3 |


    Release Notes

    golangci/golangci-lint-action

    v3

    Compare Source


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/nats-io/nats.go to v1.16.0

    Update module github.com/nats-io/nats.go to v1.16.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/nats-io/nats.go | require | minor | v1.13.0 -> v1.16.0 |


    Release Notes

    nats-io/nats.go

    v1.16.0

    Compare Source

    Changelog

    Added
    • JetStream:
      • Experimental: StreamConfig.RePublish configuration, which is a SubjectMapping (source/destination) which allows the republish of a message after being sequenced and stored (#​980)
      • Experimental: Two new ConsumerConfig fields: Replicas and MemoryStorage which are generally inherited by parent stream, but can be configured directly (#​980)
    • Websocket:
    Complete Changes

    v1.15.0

    Compare Source

    Changelog

    Experimental

    The ObjectStore is still experimental and subject to change.

    Added
    • ObjectStore:
      • MaxBytes in the ObjectStoreConfig structure (#​955)
    Improved
    • JetStream:
      • Ability pass 0 to nats.ExpectLastSequence(0) and nats.ExpectLastSequencePerSubject(0) to the js.Publish() call. Previously, the value 0 would be ignored and the header would not be set. Note that currently, the server only accepts 0 as a valid value for nats.ExpectLastSequencePerSubject(). Thanks to @​bruth for the contribution (#​958)
    Fixed
    • JetStream:
      • A PullConsumer's Fetch() method with a batch greater than 1 and with other pull consumers running, may timeout although messages would have been available (#​967)
    Complete Changes

    v1.14.0

    Compare Source

    Changelog

    JetStream and KeyValue users

    Please see the "Changed" section for important (possibly breaking) changes compared to the previous version.

    Experimental

    The ObjectStore is still experimental and subject to change.

    Added
    • JetStream:
      • Support for tracing API calls (#​849, #​911)
      • Error ErrMsgAlreadyAckd for a more detailed error when trying to acknowledge a message that already was. Thanks to @​Berreek for the contribution (#​862)
      • Made js.Subscribe() calls context aware (#​872)
      • UpdateConsumer() and new consumer configuration options: MaxRequestBatch, MaxRequestExpires and InactiveThreshold (#​893)
      • NakWithDelay() new acknowledgment call, and BackOff list of duration in the ConsumerConfig object (#​894)
      • BackOff() subscription option. Thanks to @​mfaizanse for the contribution (#​933)
      • StallWait() publish option. This is the wait time (default is 200ms) that the library will wait when reaching the maximum inflight number of asynchronous publish calls (#​941)
    • KeyValue:
      • Status functionality (#​845)
      • MetaOnly() watcher option (#​854)
      • GetRevision() to get the key at a specific revision, or ErrKeyNotFound if the key does not exist or not at the expected revision. Thanks to @​boxboatmatt for the contribution (#​903)
      • Placement in the KeyValueConfig structure (#​929)
      • Expose nats.Context() option for the nats.KeyWatcher interface. Thanks to @​boxboatmatt for the contribution (#​904)
    • ObjectStore:
      • Status functionality (#​845)
      • Placement in the ObjectStoreConfig structure (#​929)
    • ConnectedUrlRedacted() a redacted version of ConnectedUrl() (#​923)
    Changed
    • JetStream:
      • The library no longer sets a default MaxAckPending when creating a JetStream consumer on Subscribe(). The selection of the value is left for the server to pick (#​920)
      • The library will now try to resend a message when getting a ErrNoResponders error on a Publish() or StreamInfo() call. This is to overcome "blips" that may happen during leader changes. The action will be retried up to 2 times with a 250ms wait in between. These can be changed with the new publish options RetryWait() and RetryAttempts() (#​930)
      • PublishMsgAsync() will now be limited to 4,000 maximum asynchronous publish calls inflight, if no maximum has been specified with PublishAsyncMaxPending() option.
    • KeyValue:
      • Delete() and Purge() now accept optional DeleteOpt options. The option available is LastRevision() which allows the purge or delete to be conditional to the last revision be equal to the last revision value, otherwise the operation will fail. Thanks to @​steveh for the contribution (#​856)
      • PurgeDeletes() will now keep markers that are less than 30 minutes by default. Also, PurgeDeletes() now accepts optional PurgeOpt values, not WatchOpt. The new DeleteMarkersOlderThan() option can be provided to change the default 30 minutes. A negative value will remove markers, regardless of their age (#​906)
      • When connecting to a v2.7.2+ server, the stream for the KeyValue should be created with DiscardNew instead of DiscardOld. The library will now automatically update an existing stream for a KeyValue from DiscardOld to DiscardNew (#​917)
    Improved
    • Websocket:
      • Use 80 or 443 as default ports, depending on the scheme ws:// or wss://. Thanks to @​cbrake for the suggestion (#​879)
    • The connect failure error message when given an invalid user credentials file (#​916)
    • The library will now auto-reconnect when the connection is closed on maximum connections reached from server, which could happen after a configuration reload. The library would previously have caused the connection to be permanently closed (#​935)
    Updated
    • Examples:
      • The Nats-echo service example to simulate a status request (#​950)
      • Comment for the demo servers. Removed the TLS specific version since one can connect with TLS or not to the same port (#​952)
    Fixed
    • Documentation:
      • Typo in Bind go documentation. Thanks to @​caspervonb for the contribution (#​860)
      • Typo in SetClosedHandler. Thanks to @​tormoder for the contribution (#​877)
      • Typo in example_test.go. Thanks to @​bvwells for the contribution (#​882)
      • Comment for Subscribe method. Thanks to @​ipromax for the contribution (#​886)
      • Many API calls where not checking that stream and consumer names were valid, that is, did not contain a . in their name. This resulted in situations where the API would timeout because the server did not have interest on the malformed subject. Thanks to @​sata-form3 for the report (#​947)
    • JetStream:
      • Ordered consumers handling of auto unsubscribe (#​847)
      • Activity check to handle cases when subscription was closed. Thanks to @​boxboatmatt for the contribution (#​873)
      • Return ErrStreamNotFound when calling AddConsumer against a missing stream (#​881)
      • Prefix the error returned by StreamInfo() with nats: to match ConsumerInfo() (#​928)
    • KeyValue:
      • Ensure Get() returns a nil and ErrKeyNotFound as per specification (#​844)
      • Various issues, such as cancel of the context would not all the range on w.Updates() to exit, flow control, etc.. (#​900, #​901)
      • Use of the APIPrefix to work correctly across accounts (#​910)
    • Websocket:
      • When using secure connection wss:// and a host name that resolves to multiple IPs, or when trying to reconnect to discovered servers, the (re)connection would fail with websocket invalid connection (#​915)
      • Deadlock on authentication failure that manifested by a Connect() hanging forever. Thanks to @​wenerme for the report (#​926)
    Complete Changes

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module google.golang.org/protobuf to v1.28.0

    Update module google.golang.org/protobuf to v1.28.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | google.golang.org/protobuf | require | minor | v1.27.1 -> v1.28.0 |


    Release Notes

    protocolbuffers/protobuf-go

    v1.28.0

    Compare Source

    Overview

    The release provides a new unmarshal option for limiting the recursion depth when unmarshalling nested messages to prevent stack overflows. (UnmarshalOptions.RecursionLimit).

    Notable changes

    New features:

    • CL/340489: testing/protocmp: add Message.Unwrap

    Documentation improvements:

    • CL/339569: reflect/protoreflect: add more docs on Value aliasing

    Updated supported versions:

    UnmarshalOption RecursionLimit
    • CL/385854: all: implement depth limit for unmarshalling

    The new UnmarshalOptions.RecursionLimit limits the maximum recursion depth when unmarshalling messages. The limit is applied for nested messages. When messages are nested deeper than the specified limit the unmarshalling will fail. If unspecified, a default limit of 10,000 is applied.

    In addition to the configurable limit for message nesting a non-configurable recursion limit for group nesting of 10,000 was introduced.

    Upcoming breakage changes

    The default recursion limit of 10,000 introduced in the release is subject to change. We want to align this limit with implementations for other languages in the long term. C++ and Java use a limit of 100 which is also the target for the Go implementation.


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/go-redis/redis/v8 to v8.11.5

    Update module github.com/go-redis/redis/v8 to v8.11.5

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/go-redis/redis/v8 | require | patch | v8.11.4 -> v8.11.5 |


    Release Notes

    go-redis/redis

    v8.11.5

    Compare Source

    Please refer to CHANGELOG.md for details


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/vmihailenco/msgpack/v5 to v5.3.5

    Update module github.com/vmihailenco/msgpack/v5 to v5.3.5

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/vmihailenco/msgpack/v5 | require | patch | v5.3.4 -> v5.3.5 |


    Release Notes

    vmihailenco/msgpack

    v5.3.5

    Compare Source


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/onsi/ginkgo to v1.16.5

    Update module github.com/onsi/ginkgo to v1.16.5

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/onsi/ginkgo | require | patch | v1.16.4 -> v1.16.5 |


    Release Notes

    onsi/ginkgo

    v1.16.5

    Compare Source

    1.16.5

    Ginkgo 2.0 now has a Release Candidate. 1.16.5 advertises the existence of the RC. 1.16.5 deprecates GinkgoParallelNode in favor of GinkgoParallelProcess

    You can silence the RC advertisement by setting an ACK_GINKG_RC=true environment variable or creating a file in your home directory called .ack-ginkgo-rc


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/nats-io/nats.go to v1.13.0

    Update module github.com/nats-io/nats.go to v1.13.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/nats-io/nats.go | require | minor | v1.12.3 -> v1.13.0 |


    Release Notes

    nats-io/nats.go

    v1.13.0

    Compare Source

    Changelog

    JetStream users

    Please review release notes from v1.12.0 regarding important changes if upgrading from an earlier release.

    Experimental

    This release introduces KeyValue and ObjectStore as experimental features. Note that their APIs are subject to change based on community feedback. Also, some features will not work unless using NATS Server from the main branch, or the version following the latest public release v2.6.1.

    Added
    • JetStream:
      • HeadersOnly() subscription option to only deliver headers but not the message payloads (#​832)
      • Sealed, DenyDelete, DenyPurge and AllowRollup stream configuration options (#​832)
      • GetLastMsg() retrieves the last raw stream message stored in JetStream by subject (#​832)
    • KeyValue and ObjectStore (#​832)
    • ConnectedServerVersion() returns the server's version string, or empty if not currently connected to a server (#​832)
    Fixed
    • JetStream:
      • Flow control may stall in some conditions (#​837)
      • Context usage for Fetch() and Ack(). Thanks to @​andreib1 and @​T-J-L for the reports (#​838)
      • Queue name cannot contain "." character when used as the durable name. Thanks to @​saschahagedorn-f3 for the report (#​841)
      • PublishMsgAsync would fail if a message reply was already set (#​832)
    Complete Changes

    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/go-redis/redis/v8 to v8.11.4

    Update module github.com/go-redis/redis/v8 to v8.11.4

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/go-redis/redis/v8 | require | patch | v8.11.3 -> v8.11.4 |


    Release Notes

    go-redis/redis

    v8.11.4

    Compare Source

    Please refer to CHANGELOG.md for details


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/nats-io/nats.go to v1.12.3

    Update module github.com/nats-io/nats.go to v1.12.3

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/nats-io/nats.go | require | patch | v1.12.1 -> v1.12.3 |


    Release Notes

    nats-io/nats.go

    v1.12.3

    Compare Source

    Changelog

    JetStream users

    Please review release notes from v1.12.0 regarding important changes if upgrading from an earlier release.

    Fixed
    • JetStream:
      • Received message may have wrong subject. This is a regression due to an attempt to reduce subject string copy in v1.12.2 (#​827)
    Complete Changes

    v1.12.2

    Compare Source

    Changelog

    JetStream users

    Please review release notes from v1.12.0 regarding important changes if upgrading from an earlier release.

    Updated
    • JetStream:
      • Go doc for subscription calls in the interface (#​818)
    Improved
    • Reduce memory allocation for inbound messages. Thanks to @​moredure for the contribution (#​824)
    Fixed
    • JetStream:
      • Unblock Pull Subscribe requests on a 408 with at least a message already fetched (#​823)
    • Websocket:
    Complete Changes

    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/nats-io/nats.go to v1.12.1

    Update module github.com/nats-io/nats.go to v1.12.1

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/nats-io/nats.go | require | minor | v1.11.0 -> v1.12.1 |


    Release Notes

    nats-io/nats.go

    v1.12.1

    Compare Source

    Changelog

    JetStream users

    Please review release notes from v1.12.0 regarding important changes if upgrading from an earlier release.

    Added
    Fixed
    • JetStream:
      • Fetch() could return immediately with a timeout error. Thanks to @​izarraga for the report (#​813)
    • Inboxes suffix would contain many zeros (#​808)
    Complete Changes

    v1.12.0

    Compare Source

    Changelog

    Breaking Changes

    This release has some important and breaking changes for the JetStream module. Previously, it was possible to create multiple instances of non queue subscriptions to the same JetStream consumer, which was wrong since each instance would get a copy of the same message and one instance acknowledging a message would mean that the other instance's message acknowledgement (or lack thereof) would be ignored. It was also possible to create queue groups against a JetStream consumer that was used by a non queue subscription.

    This update requires the upcoming server version v2.4.0 to behave correctly, that is, the library will reject a "plain" subscription on a JetStream consumer that is already bound (that is, there is already an instance actively consuming from it), or on a consumer that was created for a queue group. It will also reject a queue subscription on a JetStream consumer that was not created for a queue group, or to a consumer that has been created for a different queue group. But it means that this update will not be able to create a queue subscription on a server pre v2.4.0 because those server do not have the concept of DeliverGroup in the consumer configuration.

    Look at the Changed section below for the list of those changes.

    The repository master branch has been renamed main. If you have a fork or a clone of the repository, you should run those git commands:

    git branch -m master main
    git fetch origin
    git branch -u origin/main main
    git remote set-head origin -a
    
    Added
    • JetStream:
      • Bind() and BindStream() options to the subscribe calls (#​740)
      • ChanQueueSubscribe() (#​744)
      • APIPrefix() and Domain() options to specify prefix or domain. Thanks to @​Jarema for the contribution (#​750, #​753)
      • Two new sentinel errors: ErrStreamNotFound and ErrConsumerNotFound. Thanks to @​actatum for the contribution (#​760)
      • MaxMsgsPerSubject option in the StreamConfig (#​768)
      • OrderedConsumer() subscription option to create a FIFO ephemeral consumer for in order delivery of messages. There are no redelivered and no ACKs, and flow control and heartbeats will be added but be taken care of without additional user code (#​789, #​793)
      • DeliverSubject() option to configure the deliver subject of a JetStream consumer created by the js.Subscribe() call (and variants) (#​794)
      • Fields DeliverGroup in ConsumerConfig, PushBound in ConsumerInfo. They help making prevent incorrect subscriptions to JetStream consumers (#​794)
      • Field Description in StreamConfig and ConsumerConfig (#​795)
      • ExpectLastSequencePerSubject() publish option (#​797)
      • DeliverLastPerSubject() subscribe option (#​798)
    • CustomInboxPrefix connection option to set the custom prefix instead of _INBOX. (#​767)
    Changed
    • JetStream:
      • Conn.JetStream() no longer looks up account information (#​739)
      • With a PullSubscription, calling NextMsg() or NextMsgWithContext() will now return ErrTypeSubscription. You must use the Fetch() API (#​794)
      • If the library created internally a JetStream consumer, the consumer will be deleted on Unsubscribe() or when the Drain() completes (#​794)
      • Fail multiple instances of a subscription on the same durable push consumer (only one active at a time). Also, consumers now have the concept of DeliverGroup, which is the queue group name they are created for. Only queue members from the same group can attach to this consumer, and a non queue subscription cannot attach to it. Note that this requires server v2.4.0 (#​794)
      • Attempting to create a queue subscription with a consumer configuration that has idle heartbeats and/or flow control will now result in an error (#​794)
      • ConsumerInfo's fields Delivered and AckFloor are now SequenceInfo objects that include the last activity (in UTC time) (#​802)
    Improved
    • Avoid unnecessary data copy in some situations. Thanks to @​Endeavourken for the contribution (#​788)
    • JetStream:
      • js.PullSubscribe() implementation that reduces the number of internal subscriptions being created/auto-unsubscribed (#​791)
      • Subscribe calls will now return an error if the consumer configuration specified does not match the current consumer's configuration. Thanks to @​kszafran for the suggestion (#​803)
    Fixed
    • JetStream:
      • Possible lock inversion (#​794)
      • JetStream consumers could be incorrectly deleted on subscription's Unsubscribe() (#​794)
    • Removed unused code. Thanks to @​rutgerbrf for the contribution (#​737)
    • Misspells in go doc. Thanks to @​dtest11 for the contributions (#​758, #​759)
    • Websocket:
      • Decompression of continuation frames (#​755)
    Complete Changes

    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/onsi/gomega to v1.16.0

    Update module github.com/onsi/gomega to v1.16.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/onsi/gomega | require | minor | v1.14.0 -> v1.16.0 |


    Release Notes

    onsi/gomega

    v1.16.0

    Compare Source

    Features

    v1.15.0

    Compare Source

    1.15.0

    Fixes

    The previous version (1.14.0) introduced a change to allow Eventually and Consistently to support functions that make assertions. This was accomplished by overriding the global fail handler when running the callbacks passed to Eventually/Consistently in order to capture any resulting errors. Issue #​457 uncovered a flaw with this approach: when multiple Eventuallys are running concurrently they race when overriding the singleton global fail handler.

    1.15.0 resolves this by requiring users who want to make assertions in Eventually/Consistently call backs to explicitly pass in a function that takes a Gomega as an argument. The passed-in Gomega instance can be used to make assertions. Any failures will cause Eventually to retry the callback. This cleaner interface avoids the issue of swapping out globals but comes at the cost of changing the contract introduced in v1.14.0. As such 1.15.0 introduces a breaking change with respect to 1.14.0 - however we expect that adoption of this feature in 1.14.0 remains limited.

    In addition, 1.15.0 cleans up some of Gomega's internals. Most users shouldn't notice any differences stemming from the refactoring that was made.


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module github.com/nats-io/nats.go to v1.20.0

    Update module github.com/nats-io/nats.go to v1.20.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/nats-io/nats.go | require | minor | v1.16.0 -> v1.20.0 |


    Release Notes

    nats-io/nats.go

    v1.20.0

    Compare Source

    Changelog

    Changed
    • JetStream:
      • [BREAKING CHANGE] Extract nats: Consumer Deleted server error to ErrConsumerDeleted variable. This error is returned when consumer is deleted while waiting on pull request and was introduced in nats-server v2.9.6 (#​1125)
    Improved
    • JetStream:
      • Fix broken comments on ErrConsumerNameAlreadyInUse and StreamNameBySubject(). Thanks to @​subtle-byte for the contribution (#​1128)
    • Core NATS:
      • Improve comment on RetryOnFailedConnect connect option (#​1127)
    Complete Changes

    v1.19.1

    Compare Source

    Changelog

    Added
    • JetStream:
      • Expose StreamNameBySubject method on JetStreamContext interface for looking up stream by subject (#​1114)
      • Return stream alternates when fetching stream info (#​1118)
    Changed
    • KV:
      • Use BindStream for watcher so it works with mirrors (#​1116)
    Fixed
    • KV:
      • Delete key not working correctly across mirrors (#​1115)
    Complete Changes

    v1.19.0

    Compare Source

    Changelog

    Added
    • KV:
      • Support for KV mirrors and sources (#​1112)
    Improved
    • JetStream:
      • Comment on InactiveThreshold to align with server version 2.9.0. Thanks to @​neilalexander for the contribution (#​1106)
    Experimental
    • Added Service framework for microservice communication using core NATS. This is an experimental preview and may be changed in future releases (#​1111)
    Complete Changes

    v1.18.0

    Compare Source

    Changelog
    Added
    • JetStream:
      • Support for DiscardNewPerSubject on stream configuration (#​1102)
    • KV:
      • KeyValueStores() and KeyValueStoreNames() methods for listing key value buckets (#​1088)
      • Bytes() method on KeyValueStatus returning size of the bucket (#​1092)
    Improved
    • JetStream:
      • Comment on Subscribe() method in JetStream interface now has a better description of the behavior after unsubscribing from a durable consumer. Thanks to @​sylr for the contribution (#​1100)
    Changed
    • JetStream:
      • Ordered consumer is now being recreated on missing heartbeat (#​1097)
      • AckNone policy can now be set for pull consumers (#​1090)
    • ObjectStore:
      • [BREAKING] ObjectStores() now returns channel of ObjectStoreStatus instead of ObjectStore interface (#​1099)
      • [BREAKING] Options on various ObjectStore methods now have individual types (GetObjectOpt, GetObjectInfoOpt and ListObjectsOpt). Only options applicable for a particular method can be used (#​1091)
      • [BREAKING] When listing/fetching object info, deleted objects are now hidden by default. New options are added to enable fetching deleted objects (GetObjectInfoShowDeleted(), GetObjectShowDeleted() and ListObjectsShowDeleted() (#​1091)
    Fixed
    • JetStream:
      • Invalid JSON tag on Tiers field on AccountInfo struct (#​1095)
    Complete Changes

    v1.17.0

    Compare Source

    Changelog

    IMPORTANT

    This release uses a new consumer create API when interacting with nats-server version 2.9.0 or higher. This changes the subjects used by the client to create consumers, which might in some cases require changes in access and import/export configuration. To opt out of this feature, use UseLegacyDurableConsumers() option when creating JetStreamContext.

    Added
    • JetStream:

      • Support for enhanced stream purge. PurgeStream() now accepts StreamPurgeRequest as an option, allowing partial purge by subject sequence number or keeping selected number of messages (#​988)
      • Option to fetch DeletedDetails when fetching StreamInfo. StreamInfo() now accepts StreamInfoRequest allowing to pass DeletedDetails flag (#​990)
      • Option to report subjects on StreamInfo() request. StreamInfo() now accepts StreamInfoRequest allowing to pass SubjectsFilter value (#​1010)
      • Support AllowDirect in stream configuration, enabling faster access to individual messages on a stream (#​991)
      • Support for DirectGet API in GetMsg() through DirectGet() and DirectGetNext() options (#​1020, #​1030)
      • HeadersOnly option to RePublish field on stream configuration and change struct name to RePublish (#​991)
      • SecureDeleteMsg() method to securely delete and overwrite a message on a stream (#​1025)
      • MaxRequestMaxBytes() PullConsumer() option allowing setting the maximum number of bytes a single Fetch()can receive (#​1043)
      • Filter streams and stream names by subject in StreamsInfo() and StreamNames() using StreamListFilter() option (#​1062)
      • Accept AckAll for pull consumers. Thanks to @​neilalexander for the contribution (#​1063)
      • Support for setting consumer replicas through Subscribe() options. Thanks to @​goku321 for the contribution (#​1019)
      • Support for setting memory storage on consumer with ConsumerMemoryStorage() option in Subscribe(). Thanks to @​goku321 for the contribution (#​1078)
    • KV:

      • RePublish option on key value configuration (#​1031)
    • ObjectStore:

      • ObjectStores() and ObjectStoreNames() methods for listing object store buckets (#​1074)
    • TLSConnectionState() to expose TLS connection state (#​996)

    • UserJWTAndSeed helper function accepting JWT and seed as parameters (#​1046)

    • natsProtoErr type for proto error normalization and comparison using errors.Is() (#​1082)

    Improved
    • JetStream

      • Add JetStreamError type for all JetStream related errors, containing error codes (for API errors). JetStreamError supports comparing and unwrapping errors using native errors package (#​1044, #​1047)
      • Force Subscribe() to use memory storage and no replicas when using OrderedConsumer() (#​989)
      • Consistent error value of context timeout when using Fetch() on pull subscription. Thanks to @​wdhongtw for the contribution (#​1011)
      • Add additional note to PullSubscribe() on durable semantics (#​994)
    • KV:

      • Utilize DirectGet() in KV for improved performence (#​1020)
    • Add support for reporting flusher errors. THanks to @​GeorgeEngland for the contribution (#​1015)

    • Mention field defaults in Options struct documentation. Thanks to @​costela for the contribution (#​1013)

    Changed
    • JetStream:
      • DeleteMsg() now uses NoErase option by default, not overwriting the message on stream (only marking it as deleted) (#​1025)
      • StreamInfo() will now return all subjects when requested (#​1072)
    Updated
    • JetStream:
      • [BREAKING] Use new consumer create API when interacting with nats-server version 2.9.0 or higher. This changes the subjects used by the client to create consumers, which might in some cases require changes in access and import/export configuration. To opt out of this feature, use UseLegacyDurableConsumers() option when creating JetStreamContext (#​1080)
      • Add missing fields to AccountInfo schema (#​1026)
      • Align StreamSourceInfo schema with server (#​1039)
    • Use nats-server 2.9.0 in tests (#​1073)
    • Add new test TLS certs and run tests for go 1.18 in CI (#​1023, #​1055)
    Fixed
    • JetStream

      • Subscribe() automatically sending ACK when AckPolicyNone is set (#​987)
      • Return error when attempting to ACK a message on a AckNone consumer (#​1032)
      • Use native time.Time.Equal method for equality check when comparing consumer configs (#​993)
      • Ephemeral PullConsumer's Fetch() failing with "no responders" (#​1022)
      • ConsumerInfo nil pointer dereference when jsi is not initialized. Thanks to @​Sergey-Belyakov for the contribution (#​1024)
      • Paging in stream and consumer name listing (#​1060)
    • ObjectStore

      • Update object Put() to avoid loosing last chunk when Reader returns both value and EOF. Thanks to @​tinou98 for the contribution (#​995)
      • Invalid digest decoding on object Get(), not propagating errors from Get() to the user (#​1052)
      • Allow updating meta if new name exists but is deleted (#​1053)
      • Disallow adding links in Put() object meta (#​1057)
    • Typo in CustomInboxPrefix() error message. Thanks to @​subtle-byte for the contribution (#​1028)

    • Ignore trailing comma at the end of URL lists (#​1058)

    Complete Changes

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module google.golang.org/protobuf to v1.28.1

    Update module google.golang.org/protobuf to v1.28.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | google.golang.org/protobuf | require | patch | v1.28.0 -> v1.28.1 |


    Release Notes

    protocolbuffers/protobuf-go

    v1.28.1

    Compare Source

    This release contains protoc-gen-go binaries for arm64.

    Notable changes since v1.28.0:

    • CL/418677: internal/impl: improve MessageInfo.New performance
    • CL/411377: proto: short-circuit Equal when inputs are identical
    • CL/419714: all: Add prebuild binaries for arm64

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update module go to 1.19

    Update module go to 1.19

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | go (source) | golang | minor | 1.15 -> 1.19 |


    Release Notes

    golang/go

    v1.19.3

    v1.19.2

    v1.19.1

    v1.19.0

    v1.18.8

    v1.18.7

    v1.18.6

    v1.18.5

    v1.18.4

    v1.18.3

    v1.18.2

    v1.18.1

    v1.18.0

    v1.17.13

    v1.17.12

    v1.17.11

    v1.17.10

    v1.17.9

    v1.17.8

    v1.17.7

    v1.17.6

    v1.17.5

    v1.17.4

    v1.17.3

    v1.17.2

    v1.17.1

    v1.17.0

    v1.16.15

    v1.16.14

    v1.16.13

    v1.16.12

    v1.16.11

    v1.16.10

    v1.16.9

    v1.16.8

    v1.16.7

    v1.16.6

    v1.16.5

    v1.16.4

    v1.16.3

    v1.16.2

    v1.16.1


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update actions/setup-go action to v3

    Update actions/setup-go action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/setup-go | action | major | v2 -> v3 |


    Release Notes

    actions/setup-go

    v3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update actions/cache action to v3

    Update actions/cache action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/cache | action | major | v2 -> v3 |


    Release Notes

    actions/cache

    v3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update actions/checkout action to v3

    Update actions/checkout action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/checkout | action | major | v2 -> v3 |


    Release Notes

    actions/checkout

    v3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
Releases(v0.2.0)
Owner
Genta Kamitani
Kyoto -> Tokyo
Genta Kamitani
The server-pubsub is the main backend of DATAVOC project that manages all the other web-server modules of the same project such as the processor

server-pubsub The server-pubsub is the main backend of DATAVOC project that manages all the other web-server modules of the same project such as the p

null 0 Dec 3, 2021
Go-komoot - An easy way to communicate your user with Komoot

Go Komoot library This is an easy way to communicate your user with Komoot. Via

João Paulo Vanzuita 0 Feb 5, 2022
ScriptTiger 20 Sep 23, 2022
communicate with iOS devices implemented with Golang

Golang-iDevice much more easy to use ?? electricbubble/gidevice-cli Installation go get github.com/electricbubble/gidevice Devices package main impor

雷系泡泡 213 Dec 18, 2022
RPC over libp2p pubsub with error handling

go-libp2p-pubsub-rpc RPC over libp2p pubsub with error handling Table of Contents Background Install Usage Contributing Changelog License Background g

textile.io 10 Dec 14, 2022
Client-Server App Using RPC to Communicate

rpc-client-server Client-Server App Using RPC to Communicate How to run the application Start the server From the root execute the following command i

Andrei Ionescu 0 Nov 24, 2021
Golang based RPC client to communicate with Metasploit

gomsf Golang based RPC client to communicate with Metasploit https://docs.rapid7.com/metasploit/rpc-api ⚠️ This is experimental and subject to breakin

Frank Hübner 5 Jul 14, 2022
Libp2p chat with discovery and pubsub

Dicovery - pubsub chat with libp2p How to test Run boostrap node $ go run main/main.go --port 35005 --nick boot --pk XDLjuaVJ2yKQ2zHMmsee5PGHtDHmkkvFA

Igor Crevar 1 Jul 3, 2022
Package event-driven makes it easy for you to drive events between services

Event-Driven Event-driven architecture is a software architecture and model for application design. With an event-driven system, the capture, communic

Ramooz 3 Apr 20, 2022
Parse any web page for URLs and return the HTTP response code of each one.

ParseWebPage - Fully Functional WebPage Parser Parse any web page for URLs and return the HTTP response code of each one. Creators ?? Steven Williams

null 0 Oct 25, 2021
A quick and dirty but useful tool to download each text/html page from the wayback machine for a specific domain and search for keywords within the saved content

wayback-keyword-search A quick and dirty but useful tool to download each text/html page from the wayback machine for a specific domain and search for

null 58 Dec 2, 2022
Get subdomain list and check whether they are active or not by each response code. Using API by c99.nl

getsubdomain Get subdomain list and check whether they are active or not by each response code. Using API by c99.nl Installation ▶ go install github.c

Akbar Kustirama 10 Oct 24, 2022
Assanlab - JSON input data with counts on how many times you showed an ad on each individual domain

JSON input data with counts on how many times you showed an ad on each individua

null 1 Dec 31, 2021
Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes.

DNS-Updater Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes. Motivation Havin

42_atomys 9 Mar 10, 2022
A modular is an opinionated, easy-to-use P2P network stack for decentralized applications written in Go.

xlibp2p xlibp2p is an opinionated, easy-to-use P2P network stack for decentralized applications written in Go. xlibp2p is made to be minimal, robust,

XFS Network 62 Nov 9, 2022
Xlibp2p: an opinionated, easy-to-use P2P network stack for decentralized applications written in Go

xlibp2p xlibp2p is an opinionated, easy-to-use P2P network stack for decentraliz

null 1 Nov 9, 2022
Uses the Finger user information protocol to open a TCP connection that makes a request to a Finger server

Finger Client This client uses the Finger user information protocol to open a TCP connection that makes a request to a Finger server. Build and Run Ru

Linda Xiao 0 Oct 7, 2021
go HTTP client that makes it plain simple to configure TLS, basic auth, retries on specific errors, keep-alive connections, logging, timeouts etc.

goat Goat, is an HTTP client built on top of a standard Go http package, that is extremely easy to configure; no googling required. The idea is simila

VSPAZ 1 Jun 25, 2022
A tool that makes http requests and outputs the url and the content (optionally to file)

BKK Basic Crawler A tool that makes http requests and outputs the url and the content (optionally to file) How to run.. the tests go test the compiler

Jero Berlin 0 Nov 8, 2021