Skip to content

Commit

Permalink
Support message headers (#10)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a pull request to our repository. -->

## Description

This PR introduces support for using message headers in the publish and
consume functions.

## Important notes

- The header keys and values are exposed as strings in the functions
that LabVIEW will call. However, it's essential to note that in the C
library, headers have specific value types, and currently, only
"AMQP_FIELD_KIND_BYTES" (unformatted byte strings) is supported.
- Transmitting and receiving an array of strings between LabVIEW and a
shared library can present challenges. Therefore, our approach involves
concatenating the strings within the array into a single string before
transmission.
- Additionally, the "queue create" function no longer automatically
binds the queue; it now has its own separate method called "bind queue."

## Related Issues

<!-- Please list any related issues or pull requests.
Fixes #{bug number} - use this specific format or issues won't be
correctly linked to the PR
-->

## Checklist

<!-- Please check off the following items by putting an "x" in the box:
-->

- [x] I have used a PR title that is descriptive enough for a release
note.
- [x] I have tested these changes locally.
- [ ] I have added appropriate tests or updated existing tests.
- [ ] I have tested these changes on a dedicated VM or a customer VM
[name of the VM]
- [ ] I have added appropriate documentation or updated existing
documentation.

---------

Co-authored-by: kwitekrac <[email protected]>
Co-authored-by: kdevelle <[email protected]>
Co-authored-by: kdevelleZ <[email protected]>
  • Loading branch information
4 people authored Nov 5, 2023
1 parent e74a6fd commit 09ba3dc
Show file tree
Hide file tree
Showing 10 changed files with 699 additions and 176 deletions.
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"files.associations": {
"optional": "c",
"istream": "c",
"ostream": "c",
"ratio": "c",
"system_error": "c",
"array": "c",
"functional": "c",
"tuple": "c",
"type_traits": "c",
"utility": "c",
"chrono": "c",
"algorithm": "c",
"sstream": "c",
"random": "c",
"*.tcc": "c",
"memory_resource": "c",
"fstream": "c",
"memory": "c",
"labview_types.h": "c"
}
}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON)
option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON)
option(INSTALL_STATIC_LIBS "Install rabbitmq-c static library" ON)

option(BUILD_EXAMPLES "Build Examples" OFF)
option(BUILD_EXAMPLES "Build Examples" ON)
option(BUILD_LABVIEW "Build LabVIEW shared library" ON)
option(BUILD_TOOLS "Build Tools (requires POPT Library)" OFF)
cmake_dependent_option(BUILD_TOOLS_DOCS "Build man pages for tools (requires xmlto)" OFF "BUILD_TOOLS" OFF)
Expand Down
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# rabbitmq-c Release Notes

## 0.0.1-dev - 2023-08-07
## 0.0.1-dev - 2023-11-05

### Features

- Support message headers (PR #10 by @kwitekrac)
- LabVIEW support (PR #8 by @kwitekrac)

### Continuous Integration
Expand Down
2 changes: 2 additions & 0 deletions labview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

set(RABBITMQ_LV_SOURCES
labview_rabbitmq.c
labview_types.c labview_types.h
msg_headers.c msg_headers.h
utils.c utils.h
unix/platform_utils.c
)
Expand Down
Loading

0 comments on commit 09ba3dc

Please sign in to comment.