title: How to Publish a message with custom attributes with Dataflow
body: <p>Gurus.</p>
  <p>I tried to search on google and all, but I seem could not able to find any resource to publish a message with a custom attribute to a Pub/Sub Topic.</p>
  <p>OBJECTIVE:</p>
  <ul>
  <li>One Topic with 2 Subscriptions</li>
  <li>Each Subscription has an Subscription filter for specific values:
  <ul>
  <li>SubscriptionA - attribute.table = &quot;Table1&quot;</li>
  <li>SubscriptionB - attribute.table = &quot;Table2&quot;</li>
  </ul>
  </li>
  </ul>
  <p>ALREADY DONE:</p>
  <ul>
  <li>There would be specific Dataflow triggers watching each Subscription</li>
  <li>Filters already applied to each Subscription, where messages are routed to the specific Subscription.</li>
  </ul>
  <p>CHALLENGE:</p>
  <ul>
  <li>How to write a simple message with a custom attribute to the Pub/Sub Topic like example:
  <ul>
  <li>APPLICATION_A - after previous execution, send a Pub/Sub Message with the value &quot;Table1&quot; for the attribute &quot;table&quot;</li>
  <li>APPLICATION_B - after previous execution, send a Pub/Sub Message with the value &quot;Table2&quot; for the attribute &quot;table&quot;</li>
  </ul>
  </li>
  </ul>
  <p>NEXT STEPS:</p>
  <ul>
  <li>Maybe if anyone could point me to the right direction to achieve this? Or some sort of guide?</li>
  <li>Since most resource found are focused on just sending a message, but what about the attributes itself? Is there a possibility to add custom attributes when writing to Pub/Sub Topic through Dataflow/Beam?</li>
  </ul>