MuleSoft_Misc Flashcards

1
Q

Where are dataweave functions packaged in Mule?

A

Mule functions are packaged in Modules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the default functions that are imported in DataWeave scripts?

A

Functions in the core modules are imported automatically in Mule

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the alternative solutions that can be used for functions with 2 parameters?

A
#[contains(payload, MAX)]
#[payload contains "MAX"]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is alternative syntax for the following expression?

sizeOf(filter(payload, (value) -> value.age > 30))

A

sizeOf(payload filter $.age > 30)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is the following sequence of functions are executed?

flights orderBy $.price filter ($.availableSeats > 30 )

A

The last function in the chain is executed first filter and followed by orderBy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which function is used for removing duplicate data?

A

distinctBy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which function is used to filter records?

A

Filter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which function is used to order records on the basis of a key?

A

orderBy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to add dash in place of space or any other parameter?

A

using dasherize function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to call flows from a dataweave expression?

A

{a: lookup(‘myFlow’, {b: ‘Hello’})}
Inside lookup function first parameter is the flow name and the second parameter is the payload we want to send to the flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In Mule 4, All connectors are operation based and not transport based?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How Mule 4 connectors are more flexible?

A
  • File connectors can read anywhere in the flow.
  • Database connectors can query anywhere in the flow.
  • JMS connector can consume anywhere in the flow.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do we synchronize data from one system to another?

A

In data synchronization, initially we need to synchronize the initial payload and subsequent times we need to synchronize only new data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do we determine which data need to be synced up and when?

A

In the first sync store the timestamp and in the subsequent times check if the timestamp is greater than the previous timestamp.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a timestamp?

A

The timestamp is often a:-
1- Creation Timestamp
2- Modification Timestamp
3- Record ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the types of watermarking in Mule?

A

There are 2 types of watermarking in Mule:-

  • Automatic
  • Manual
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Watermarking option is available for which operations?

A

Automatic watermarking operation is available for the New and Updated file operation for the family of file connectors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Watermark can be used to ensure if a file is new? What are the other options that can be used to ensure if a file is new?

A

Delete, move, filter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How does the db query looks like when we enable watermarking?

A

SELECT * FROM table WHERE TIMESTAMP > :watermark

20
Q

How does watermark behaves?

A

On each poll the component will go through all the retrieved rows and store the maximum value obtained.

21
Q

Handling idempotency across concurrent requests?

A

A new poll can be executed before the watermark is updated if

  • The poll interval is small
  • The amounts of rows is big
  • Processing one single row takes too much time.
22
Q

In order to handle the idempotency and avoid reprocessing of single record multiple times what should we use?

A

Specify an ID column make sure the row is not processed again if:-

  • processing of it has already been done.
  • or the processing of record is underway.
23
Q

What are steps involved in manual watermarking?

A

The general process is:-

  • Schedule when a flow should be executed.
  • Give the watermark default value.
  • on the first sync
    • Determine a new watermark value
    • store the watermark value so it is available in the future for other flows.
  • on the later sync
    • Retrieve the watermark from storage.
    • Check if each item in the data set should be retrieved based on watermark value.
24
Q

What are types of scheduling strategies?

A
  • Fixed Frequency

- CRON Job

25
Q

What is the purpose of Object Store?

A

We can use object store to determine and store the watermark value

26
Q

What is JMS?

A

JMS is a widely-used API for enabling applications to communicate through the exchange of messages.

27
Q

What are the different messaging models supported by JMS?

A
  • Queues and Topics
28
Q

What is Queue based communication?

A

Queue is 1 to 1 approach of communication

29
Q

What is Topic based communication?

A

Topic is 1 to many approach of communication

30
Q

Which is the default message broker used by Mule?

A

Active MQ broker

31
Q

What are the different types of message broker?

A
  • Active MQ broker

- Rabbit MQ broker

32
Q

What is for each scope used for?

A

for each scope processes the collection of payload in a synchronized fashion

33
Q

What is the purpose of parallel for each?

A

parallel for each is exactly similar to for each except apart it processes the records in an Asynchronous fashion.

34
Q

If we have an ArrayList of LinkedHashMap then inside of for each what it will be?

A

It will be LinkedHashMap inside the parallel for each scope.

35
Q

What is the purpose of Batch Processing?

A

It’s used for processing a huge data set running into millions of records

36
Q

How does a Batch Job works?

A

A batch job consists of one or more batch steps which act upon the records as they move through the batch job.

37
Q

What are the different phases a batch job contains?

A

In Mule 4 a batch job contains only following phases:-

  • Load and dispatch
  • process
  • on complete

In Mule 3 a batch job contains following phases:-

  • Input
  • Load and dispatch
  • process
  • on complete
38
Q

What are steps involved in Load and Dispatch phase?

A

Load and dispatch(implicit)

  • performs “behind-the-scene” work
    • Splits payload into a collection of records
    • Creates a persistent queue and stores each record in it.

Process(Required)

  • Asynchronous process the records
  • Contains one or more batch steps

On Complete(Optional)

  • Reports summary of records processed
  • Provides insight into which records failed so you can address issues
39
Q

How record processing works?

A
  • one queue exists
  • Each record
    • keeps track of what steps it has been processed through.
    • Moves through the processors in the first step
    • Is sent back to the queue
    • Waits to be processed by the second step
  • This repeats until each record has passed through every step.
    Note: All records do not have finish processing in one step before any of them are sent to the next step.
40
Q

What is block size in batch processing?

A

100

41
Q

What is the thread size?

A

A thread profile of 16 threads per job is used

42
Q

Explain threading profile of 16 threads?

A
  • Each of 16 threads processes a block of 100 records.
  • Each thread iterates through that block processing each record, and then each block is queued back and then the process continues.
43
Q

Is the default configuration of batch processing enough for all batch processing records?

A

Yes default configuration of batch processing is enough for all batch processing records but it is customizable.

44
Q

How do we handle record-level errors during processing?

A

For handling failure of records there are 3 options in batch processing:-

  • Stop processing the entire batch(default)
  • Continue processing the batch
  • Continue processing the batch until a max number
45
Q

How to filter the records in batch processing?

A

We have 2 attributes to filter records

  • An accept expression
  • An accept policy
46
Q

What is batch job?

A

Batch Job scope (EE only) for complex batch jobs

  • created especially for processing data sets.
  • Splits messages into individual records and performs action upon each record.
  • Can have multiple batch steps and these can have filters
  • Record-level data is persisted across steps using variables.
  • Can handle record level failures so the job is not aborted.
  • The batch job returns an object with the results of the job for insights into which records were processed or failed.