105 Commits

Author SHA1 Message Date
Dušan Borovčanin 61d0427898 NOISSUE - Rename to Magistrala (#3427)
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2026-04-06 15:23:42 +02:00
Dušan Borovčanin 791e084de6 NOISSUE - Switch to / delimiter (#3424)
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2026-04-03 18:37:00 +02:00
Dušan Borovčanin ef5c253c51 SMQ-3399 - Unify Magistrala and SuperMQ (#3400)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: dusan <borovcanindusan1@gmail.com>
Co-authored-by: Steve Munene <stevenyaga2014@gmail.com>
2026-04-01 09:55:11 +02:00
Nataly Musilah 15e756a5a3 SMQ-3026 - Update READMEs and make them use the same l&f (#3239)
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
2025-12-01 18:52:53 +01:00
Dušan Borovčanin c5eee6d8fd NOISSUE - Update dependencies (#3197)
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2025-10-20 16:54:01 +02:00
Dušan Borovčanin a19cd9c97b NOISSUE - Replace interface{} with any (#3079)
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2025-08-25 18:06:41 +02:00
Felix Gateru 7ecdd7ebe3 SMQ-2971 - Bump mockery version to 3.5.0 (#2991)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-07-03 15:14:14 +02:00
Arvindh 21c7b1019e SMQ-2888 - Change internal message topic format (#2889)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2025-06-05 09:48:56 +02:00
Dušan Borovčanin a01d2571de NOISSUE - Enable empty Transformers (#2810)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2025-04-10 15:54:42 +02:00
Felix Gateru 6011cad546 NOISSUE - Update Mockery version and config (#2784)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-04-01 20:56:07 +02:00
Dušan Borovčanin e56b86823e NOISSUE - Rename YAML files extension (#2782)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2025-03-31 10:51:43 +02:00
Felix Gateru 3a11b54394 NOISSUE - Revert removal of notifier interface (#2643)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-01-13 10:14:33 +01:00
Felix Gateru a9169276e5 SMQ-2629 - Remove Readers and Consumers (#2641)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-01-10 11:26:39 +01:00
Dušan Borovčanin f0d014eba2 NOISSUE - Move API to the common package (#2608)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-12-19 18:29:53 +01:00
Dušan Borovčanin 178aa46ad4 SMQ-2533 - Rename Magistrala to SuperMQ (#2560)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-12-04 11:17:09 +01:00
Steve Munene ca8ed3b006 MG-2441 - Add domain ID to API (#2442)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
2024-10-23 21:40:13 +02:00
Dušan Borovčanin eb881690c7 MG-2443 - Move Auth to the middleware (#2444)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
Co-authored-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
2024-10-17 16:24:53 +02:00
b1ackd0t 2098c85287 NOISSUE - Update redis, uuid and env dependecies (#2418)
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2024-09-13 14:57:34 +02:00
Felix Gateru 48c4a7e7d4 MG-2264 - Split Auth Client into Separate Clients for AuthN/AuthZ and Policy CRUD (#2392)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
2024-09-03 16:50:28 +02:00
JMboya 6a41ea10a3 MG-2365 - Fix JaegerURL in readme.md and cmd/<svc>/main.go (#2366)
Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
2024-08-02 16:28:26 +02:00
Dušan Borovčanin 5412bddfcf MG-2187 - Simplify Magistrala core repository (#2338)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-07-15 17:38:48 +02:00
JMboya 468362aac4 MG-2193 - Generate mocks for proto interface (#2324)
Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
2024-07-12 10:36:12 +02:00
b1ackd0t ee3716623c MG-1557 - Export jaeger, metrics, postgres and apiutil packages (#2262)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2024-06-28 12:45:20 +02:00
Dušan Borovčanin be9bc22df4 NOISSUE - Update CI tools (#2314)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-06-25 13:45:11 +02:00
Dušan Borovčanin 6ea6d6756b NOISSUE - Fix failed log message (#2307)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-06-24 17:56:36 +02:00
b1ackd0t dba14f8c74 MG-2200 - Remove Unused Errors (#2243)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-05-20 14:36:02 +02:00
b1ackd0t 19c1261e81 NOISSUE - Add property based testing to notifiers API (#2175)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-04-29 16:07:57 +02:00
Steve Munene 8915b73953 MG-2173 - Generate mocks with mockery for Twins service (#2174)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
2024-04-23 14:18:42 +03:00
Steve Munene cf832af14b MG-2147 - Generate mocks with mockery for Consumer service (#2150)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
2024-04-22 10:52:54 +02:00
Dušan Borovčanin 658003080e NOISSUE - Update Docker and Compose versions (#2159)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-04-10 12:02:36 +02:00
Dušan Borovčanin a39d46238b NOISSUE - Fix links in README.md file (#2129)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-04-03 11:55:06 +02:00
b1ackd0t 0ed79371a4 NOISSUE - Remove duplicate errors (#2086)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-02-21 14:31:11 +01:00
Felix Gateru 7a93e6a893 NOISSUE - Improve tests in Auth service (#262)
Signed-off-by: felix.gateru <felix.gateru@gmail.com>
2024-01-25 14:03:20 +01:00
Nataly Musilah 4a909a1ab2 MG-234 - Improve Logging Middleware (#272)
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
2024-01-24 18:04:29 +01:00
Dušan Borovčanin 79ef28a9ce NOISSUE - Update dependencies (#2061)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-01-23 13:09:07 +01:00
Nataly Musilah 8c084b177e MG-234 - Improve Logging (#255)
Signed-off-by: Musilah <nataleigh.nk@gmail.co>
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
Co-authored-by: Musilah <nataleigh.nk@gmail.co>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@abstractmachines.fr>
2024-01-18 15:28:04 +01:00
b1ackd0t 95f31d70a2 NOISSUE - Use methods for accessing in generated code (#204)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-01-18 13:57:22 +01:00
b1ackd0t 0016d67055 NOISSUE - Add Test for apiutil package (#195)
* Test for parsing and handling query parameters

The provided code includes test cases written that cover various scenarios for parsing and handling query parameters in HTTP requests.
These scenarios include valid and invalid queries, empty queries, and multiple queries with the same key.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* replace ReadUintQuery with ReadNumQuery

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-20 16:41:07 +01:00
b1ackd0t 0ecf5aa746 NOISSUE - Update mTLS support (#134)
Make sure MTLS support works after the new auth changes
2023-12-11 11:13:41 +01:00
Sammy Kerata Oina 6f0874c85a NOISSUE - Add Linters (#79)
* add linters

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix linting errors

Signed-off-by: sammy <sammyoina@gmail.com>

* fix linting

Signed-off-by: sammy <sammyoina@gmail.com>

* add callhome alias

Signed-off-by: sammy <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: sammy <sammyoina@gmail.com>
2023-12-06 17:02:47 +01:00
Felix Gateru 3d1ce7c3c8 MG-31 - Fix Consumers tests (#101)
Signed-off-by: felix.gateru <felix.gateru@gmail.com>
2023-12-01 13:47:07 +01:00
Felix Gateru 004782dd49 MG-30 - Auth: Migrate from bone to chi (#47)
* Migrate from bone to chi

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* Migrate from bone to chi

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* Add subroutes

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* Update auth service

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* update bootstrap

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* Update multiplexer

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* Refactor user and things handler

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

* Refactor user and things handler

Signed-off-by: felix.gateru <felix.gateru@gmail.com>

---------

Signed-off-by: felix.gateru <felix.gateru@gmail.com>
2023-11-27 18:57:44 +01:00
b1ackd0t 01b312a01b NOISSUE - Fix Consumers Tests (#43)
Fix tests in consumers package by syncing with the new auth scheme
2023-11-21 13:50:14 +01:00
b1ackd0t 7c5ad097b9 NOISSUE - Fix loading Auth config (#64)
Fix bug in loading auth config and also refactor postgres connect
2023-11-20 14:06:00 +01:00
b1ackd0t a0c40ba462 NOISSUE - Update Copyright Notice (#39)
* chore(license): update copyright notices

Add CI check for non go files to check that the files contain a license

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* fix(ci): log failed files

When the CI fails during check for license header, log the failed file to console so that someone can check on the actual file. Also simplify the grep check to make it more human readable and understandable

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-11-17 12:37:30 +01:00
b1ackd0t 44408395e6 NOISSUE - Fix renaming issues (#17)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-11-02 14:48:13 +01:00
Dušan Borovčanin 254dbcd555 NOISSUE - Fix gRPC client naming (#22)
* Fix Auth gRPC server name

Signed-off-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>

* Rename import aliases

Signed-off-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>

* Rename issuer name to Magistrala

Signed-off-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>

---------

Signed-off-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>
Co-authored-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>
2023-11-01 19:17:24 +01:00
dusanb94 7066101996 Rename Mainflux to Magistrala
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2023-10-26 12:50:56 +02:00
b1ackd0t 4401e79a0d NOISSUE - Add Subscriber Config (#1896)
* Replace Nats with Nats Jestream For PubSub

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Stream Description

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix connection leak in NATS publisher

The publisher struct in pkg/messaging/nats/publisher.go was modified to include a new `conn` field of type `*broker.Conn`. This change was made to fix a connection leak issue in the NATS publisher.

The `NewPublisher` function was updated to assign the `conn` parameter to the new `conn` field in the publisher struct.

Additionally, the `Close` method in the publisher struct was modified to close the `conn` connection.

This commit fixes the connection leak issue in the NATS publisher and ensures that connections are properly closed.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Setup subscriber config to contain handler topic and ID

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add delivery policy

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Avoid duplicate messages

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename to DeliveryPolicy

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Not check for data result set when we are returning subset of messages

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* For unsubscribe remove config

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Fix comment

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-23 15:27:15 +02:00
b1ackd0t 790f8a6abf NOISSUE - Make MQTT Broker Configurable (#1904)
* Minor changes on mqtt publisher using nats

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Remove vernemq dependencies

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Restore VerneMQ config files

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix Makefile to support custom Docker profiles

The Makefile has been updated to support custom Docker profiles.
Previously, the Makefile only supported the default profiles for the
message broker and MQTT broker. Now, the Makefile allows for custom
profiles to be specified using environment variables. If the
MF_BROKER_TYPE or MF_MQTT_BROKER_TYPE variables are not set, the
default values "nats" and "nats" will be used, respectively. This
change enables more flexibility in configuring the Docker environment
for the project.

The `run` target has also been modified to use the correct broker
configuration file based on the MF_BROKER_TYPE variable. The sed
command in the `run` target now replaces the placeholder in the
docker/docker-compose.yml file with the appropriate broker
configuration file.

This commit improves the Makefile to support custom Docker profiles
and ensures the correct broker configuration file is used when
running the project.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix queue binding issue in RabbitMQ pubsub

The commit fixes an issue in the RabbitMQ pubsub implementation where the queue binding was not correctly set up. Instead of using the topic as the queue name, the commit now uses a unique client ID generated by combining the topic and subscriber ID. This ensures that each subscriber has its own dedicated queue. The commit also updates the queue binding to use the correct queue name.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor Docker config editing in Makefile

The commit refactors the `edit_docker_config` function in the Makefile to improve readability and maintainability. The changes include:

- Removing unnecessary conditionals related to the `rabbitmq` broker

These changes ensure that the Docker configuration is correctly updated based on the specified MQTT broker type.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix failing tests on RabbitMQ

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor MQTT_BROKER comment in docker-compose.yml

The MQTT_BROKER comment in the docker-compose.yml file has been updated to provide a more accurate description of its functionality. The comment now states that the MQTT_BROKER handles MQTT communication between MQTT adapters and the message broker, instead of Mainflux services. This change improves clarity and aligns with the actual purpose of the MQTT_BROKER.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Rename `MF_BROKER` to `MF_MESSAGE_BROKER`

The Makefile and Semaphore configuration files have been refactored to update the variable names related to the message broker type.

These changes ensure consistency and clarity in the codebase by using more descriptive variable names related to the message broker type.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix Docker profile configuration for nats_rabbitmq

Update the Docker profile configuration for nats_rabbitmq by replacing the NATS URL in the .env file with the correct value.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Rename MF_BROKER_URL to MF_MESSAGE_BROKER_URL

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix MQTT QoS level in pubsub.go

The MQTT QoS level in the pubsub.go file was set to 1, which is the
default level. However, since NATS supports up to QoS 1, I updated the
QoS level comment to reflect this.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor NewPublisher to accept QoS parameter

The NewPublisher function in the pkg/messaging/mqtt/publisher.go file has been refactored to accept a new parameter, qos, which represents the Quality of Service level for MQTT message publishing. This change allows for more flexibility in configuring the MQTT publisher.

The NewPublisher function now has the following signature:

```go
func NewPublisher(address string, qos uint8, timeout time.Duration) (messaging.Publisher, error)
```

This change ensures that the MQTT publisher can be created with the desired QoS level, enhancing the reliability and delivery guarantees of the published messages.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix test assertions in pubsub_test.go

The test assertions in the pubsub_test.go file were incorrect. This commit fixes the assertions to properly compare the expected and received message values.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Test configurable MQTT broker

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-10-19 21:01:09 +02:00