Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(lib/fluent/plugin/in_sqs.rb) Raw message #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamessantos10
Copy link

Adding the parameter raw_message, and enabling as true in my fluent.conf, I can see the raw message, if it is a json is shown json and if it is a string is shown the string. Example below that it worked correctly.

Before correction:

{"body":"{\n\n \"application\": \"teste-portuga\",\n   \"environment\": \"teste-portuga\"\n}\n","receipt_handle":"AQEBdqji/Q+s4h5byM74e3HDU6MsPLMshdxNbU0ZoxG70QlHzWnT1hY01wiyUafLwtz/4oQpaXVuWMnd2CbYwWzSEmltfdjxYIJcwTkGGPdR/PxWBbitUyN7x/RQfb7YxLLNYEy6tbZSVQOGRnk79bx19fx6qA3i8Lzl5wdRk7Xj4xhuHoKBaqZKpkVkA5gKZtf8izmxpmFph3cj+6UwR367EtVpK0Q/x6cGP5/ToYZxKEANRcxpvnHQMEnISu7//YsFcxeV/CN2mvSLIj0fFCv3UVfqpsbUVLS4dxDVHs9ypGewCrqX8j0yiBvMefnY/ovEc9iaTvwl/0tsubxaOWckn5w1tD5Mz1zpplOL/lue6O0LCh5yuf5ZSl9VYdj9t0GsmqHywSa8WtIogpG7cLnSGg==","message_id":"7556e466-97d5-4feb-a056-9410878a5746","md5_of_body":"3606fb98abe1341bd47cadea430381d2","queue_url":"https://sqs.sa-east-1.amazonaws.com/620282384849/teste-portuga","sender_id":""}

After correction:

{"application":"teste-portuga","environment":"teste-portuga"}

Obs: this is my fluent.conf:

 <source>
    @type sqs
    tag "portuga"
    sqs_url "teste"
    aws_key_id xxxxxx
    aws_sec_key xxxxxx
    region "region"
    raw_message true
    delete_message 
  </source>
  <match portuga>
    @type stdout
    <format>
      @type "json"
    </format>
  </match>

jamessantos10 added a commit to jamessantos10/fluent-plugin-sqs that referenced this pull request Oct 1, 2018
jamessantos10 added a commit to jamessantos10/fluent-plugin-sqs that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant