Robert Gsellman could be on borrowed time in this rotation, but these are the Mets, for whom even the best-considered plans change often, so don’t bet on anything.

This much is known: Gsellman has shown improvement over his last two starts, after a dreadful stretch to begin the season, and the Mets plan to insert Steven Matz and Seth Lugo into the rotation after each makes at least one additional minor league rehab start.

For Gsellman that would mean a shift to the bullpen as soon as early next week, after starting against the Pirates on Saturday. Until then, the Mets will take more of what they received Monday in a 4-2 victory over the Brewers at Citi Field.

“Starting is a little more fun, but I will do what they say — I just want to win,” said Gsellman, who made two relief appearances earlier this month.

Gsellman (3-3) became the fourth straight Mets starting pitcher to complete at least six innings. He allowed two runs, one unearned, on three hits and two walks with five strikeouts over seven innings and 105 pitches as the Mets (22-27) won their second straight.

In his previous start, against the Padres last Wednesday, the rookie allowed three runs over six innings, but received a no-decision after a bullpen meltdown in the seventh and eighth innings surrendered the lead.

This time Gsellman was asked to pitch the seventh and rewarded manager Terry Collins with a 1-2-3 inning against the bottom of the Brewers’ batting order.

“The seventh inning is always a big inning,” Gsellman said. “I’m glad Terry sent me out for the seventh and I got the job done.”

Paul Sewald and Addison Reed combined to pitch the final two innings scoreless. For Reed, it was a rebound from his blown save two days earlier in Pittsburgh that helped sink the Mets in a 5-4 loss in 10 innings.

Collins faced a decision in the sixth, after Rene Rivera was drilled to load the bases with two outs and Gsellman due up. Gsellman was allowed to bat against reliever Rob Scahill and worked the count full before drawing a walk that gave the Mets a 4-2 lead.

Collins said the fact he didn’t have Jerry Blevins available because of the lefty’s recent workload made it an easy decision to entrust Gsellman with the seventh inning.

“We needed another inning out of him,” Collins said. “Coming off his last outing I think his confidence was there. He rose up and got us where we needed to get to.”

Gsellman had rolled into the sixth with a 3-1 lead that was sliced in half on Domingo Santana’s golf shot that just cleared the left-field fence.

Rivera’s RBI double was the Mets’ first big hit in a three-run fifth inning against Matt Garza. With it 1-1 following Rivera’s double, Gsellman hit a fly to medium right on which slow-footed Wilmer Flores tagged up from third and scored. Michael Conforto’s ensuing RBI double brought in the final run in the frame.

Garza lasted 5 ²/₃ innings for the Brewers and allowed four earned runs on seven hits with two walks and four strikeouts. The righty had surrendered two earned runs over six innings in a victory over the Mets earlier this month.

The Brewers scored an unearned run against Gsellman in the fifth to take a 1-0 lead. Asdrubal Cabrera’s throwing error on Jonathan Villar started the inning, in which the run scored on Keon Broxton’s RBI ground out. But Collins welcomed grounders — it was a signal Gsellman had his sinker working.

“Even the hits were ground balls,” Collins said. “That was the guy we saw last year, the guy we know he can be.”