{"id":15998601,"url":"https://github.com/d7561985/protonats","last_synced_at":"2025-06-24T06:05:46.529Z","repository":{"id":46311611,"uuid":"422322768","full_name":"d7561985/protonats","owner":"d7561985","description":"Cloud Events NATS extended protocol: opentracing, subject pool for group ","archived":false,"fork":false,"pushed_at":"2021-10-31T14:16:10.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T21:46:47.202Z","etag":null,"topics":["cloudevents","groups","nats","opentracing","pool","protocol","subjects"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d7561985.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-28T18:58:50.000Z","updated_at":"2023-09-08T18:28:01.000Z","dependencies_parsed_at":"2022-09-06T05:30:19.869Z","dependency_job_id":null,"html_url":"https://github.com/d7561985/protonats","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/d7561985/protonats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d7561985%2Fprotonats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d7561985%2Fprotonats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d7561985%2Fprotonats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d7561985%2Fprotonats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d7561985","download_url":"https://codeload.github.com/d7561985/protonats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d7561985%2Fprotonats/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261618105,"owners_count":23185091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudevents","groups","nats","opentracing","pool","protocol","subjects"],"created_at":"2024-10-08T08:20:28.641Z","updated_at":"2025-06-24T06:05:46.500Z","avatar_url":"https://github.com/d7561985.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Cloud Events NATS protocol\n\nUpdated nats protocol for https://github.com/cloudevents/sdk-go/tree/main/protocol/nats/v2\n\nThis package extent `opentracing` package for trace carrier\n\nFeature:\n\n* OpenTracing features with \"github.com/d7561985/tel\" send trace `to` NATS, read tracing span `from` NATS\n* Producer uses `context.TopicFrom` feature for overwrite default subject\n* Consumer subject pool for group\n* Protocol Consumer and Sender struct members are Interfaces and easily could be replaced\n* Trace carried within cloudevents payload that's why this allows `TeleObservability` to be ubiquitous for any protocol\n\n== Trace feature enable\n\nWe use `TeleObservability` correctly read span from NATS and pack it correctly.\nBut this is only like middleware.\n\nAll engine pack/unpack under `adapter`\n\n[source,go]\n----\npackage main\n\nimport (\n\t\"github.com/d7561985/tel\"\n\t\"github.com/d7561985/tel/monitoring/metrics\"\n\tcenats \"github.com/cloudevents/sdk-go/protocol/nats/v2\"\n\tcloudevents \"github.com/cloudevents/sdk-go/v2\"\n\t\"github.com/cloudevents/sdk-go/v2/client\"\n\t\"github.com/d7561985/protonats\"\n)\n\nfunc main()  {\n\tt := tel.New(tel.GetConfigFromEnv())\n\n\tp, err := protonats.NewProtocol(env.NATSServer, \"-\", \"\", cenats.NatsOptions())\n\n\tmetricsss := metrics.NewCollectorMetricsReader()\n     ce, err := cloudevents.NewClient(p,\n         client.WithObservabilityService(protonats.NewTeleObservability(\u0026t, metricsss)),\n     )\n\n}\n----\n\n== Consumer Subject Group pool\n\nUse option for protocol - `WithConsumerOptions`\n\n[source,go]\n----\n    p, err := protonats.NewProtocol(env.NATSServer, \"-\", \"\",\n\t\tcenats.NatsOptions(),\n\t\tprotonats.WithConsumerOptions(\n\t\t\tprotonats.WithQueuePoolSubscriber(\"MyQueue\",\n\t\t\t\t\"MySubject1\", \"MySubject2\",\n\t\t\t),\n\t\t),\n\t)\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd7561985%2Fprotonats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd7561985%2Fprotonats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd7561985%2Fprotonats/lists"}