Introduction #
In this tutorial, we will learn how Agent File Adapter works for consumers. Agent File Adapter for consumers means Inbound Agent File Adapter. We use Inbound Agent File adapter for reading using the new event-driven mode with the consumer. We have an event-driven listener who is a camel consumer. We don’t need a scheduler. We add the real-time and event-driven feature to pick up immediately. To use the Agent file for consumers, we need to configure the Agent Control Board, and we need to create an Agent File adapter.
Pre-require #
Firstly, you need to have some required step before you can use the Agent File adapter:
- Create Metadata Provider, Istructure Repository
- Configure a New Agent control board
- To checking to catch a New Agent control board
Configuration #
- Create Metadata Provider, Istructure Repository and Create Flat Message
2. Go to the Integration Detail page
- Click on the new agent control board
- Now we need to create a connection destination. For that, we can give any name to the destination. As shown below.
- Fill all the required fields in Salesforce -> Agent
- Click on the Ping Agent connection
- Fill all the required fields in Agent -> Salesforce and click on the Ping Salesforce Connection
- Save
Case 1 #
Create Inbound Agent File Adapter for Excel format and Protocol: FTPs
- Create Inbound Agent File Adapter for excel format
Fill all required field
- Name: any Name
- Type: Agent File
- Direction: Inbound
- Protocol: FTPs
- Host: Public IP Address
- Username: FTPs Username
- Password: FTPs password
- Port: FTPs Server Port
- File Type: Excel
- Folder: Sreymay/Inbound2/Excel
- File Name: MyAccount2.xlsx
- What to do with the file after Processing?: Delete File
- Connection Destination: your destination name
- Create an inbound interface, add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below.
- Add inbound Adapter
- Mapping
- Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board
You will get a success message when the route started successfully.
- Upload Excel file on consumer folder. Example: MyAccount2.xslx
- Here is the result of Excel in Message monitor
Case 2 #
Create Inbound Agent File Adapter for XML format and Protocol: SFTP
- Create Inbound Agent File Adapter for XML format
Fill all required field
- Name: any Name
- Type: Agent File
- Direction: Inbound
- Protocol: SFTP
- Host: Public IP Address
- Username: SFTP Username
- Password: SFTP password
- Port: SFTP Server Port
- File Type: XML
- Folder: SFTP/XML
- File Name: Account-SB3.xml
- What to do with the file after Processing?: Delete File
- Connection Destination: your destination name
- Create an inbound interface, add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below
- Add inbound adapter
- Mapping
- Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board
You will get a success message when the route started successfully.
- Upload XML file on consumer folder. Example: Account-SB3.xml
- Here is the result of XML in the Message monitor
Case 3 #
Create Inbound Agent File Adapter for JSON format and Protocol: FTP
- Create Inbound Agent File Adapter for excel format
Fill all required field
- Name: any Name
- Type: Agent File
- Direction: Inbound
- Protocol: FTP
- Host: Public IP Address
- Username: FTP Username
- Password: FTP password
- Port: FTP Server Port(21)
- File Type: JSON
- Folder: Sreymay/Inbound/Json
- File Name: Final_json5.json
- What to do with the file after Processing?: Delete File
- Connection Destination: your destination name
- Create an inbound interface, add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below
- Add inbound Adapter
- Mapping
- Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board
You will get a success message when the route started successfully.
- Here is a result of JSON in Message Monitor
#
Summary: The user learned about how Agent File Adapter works for consumers, We add the real-time and event-driven feature to pick up immediately. To use the Agent file for consumers. Here users can understand by seeing these inbound cases, FTPs, SFTP, FTP file protocol.