Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Support setting source selector filter #5

Merged
merged 2 commits into from
Jan 16, 2018
Merged

Support setting source selector filter #5

merged 2 commits into from
Jan 16, 2018

Conversation

vcabbage
Copy link
Owner

  • Added LinkSelectorFilter() link option.
  • Refactored readComposite to try decoding as described type when not
    a know composite.
  • Added describedType to marshal tests.
  • Added String() methods for debugging.

Note: Event Hubs was sending back 0x137000000a as descriptor code when LinkSelectorFilter() was using a string as the descriptor. I haven't been able to figure out what that code refers to.

This is more work than I initially anticipated. Seems I never
implemented marshalling of maps and completely skipped over described
types. Filtering based on offset in a quick Event Hubs test works, but
some of the chages are hacky. I want to do a little clean up and think
on some of the approaches before merging.
* Added unmarshal method to `describedType`.
* Refactored `readComposite` to try decoding as described type when not
  a know composite.
* Modified `LinkSelectorFilter()` to use code in descriptor instead of
  string.
* Added `describedType` to marshal tests.
* Added `String()` methods for debugging.

Note: Event Hubs was sending back `0x137000000a` as descriptor code when
      `LinkSelectorFilter()` was using a string as the descriptor.
      I haven't been able to figure out what that code refers to.
@coveralls
Copy link

coveralls commented Jan 15, 2018

Coverage Status

Coverage decreased (-1.2%) to 75.814% when pulling 7475715 on selector-filter into 92b4f0d on master.

@torosent
Copy link

I tested the code with
”amqp.annotation.x-opt-offset > '100'"
”amqp.annotation.x-opt-offset >= '100'”

and it is working great. 👍

@vcabbage vcabbage merged commit 9f2af47 into master Jan 16, 2018
@vcabbage vcabbage deleted the selector-filter branch January 16, 2018 15:44
@vcabbage
Copy link
Owner Author

@torosent Thanks for testing it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants